Skip to content

Instantly share code, notes, and snippets.

@itzjonas
Created January 25, 2025 18:48
Show Gist options
  • Save itzjonas/7bb12ec682a030dc69be41b3b052cb02 to your computer and use it in GitHub Desktop.
Save itzjonas/7bb12ec682a030dc69be41b3b052cb02 to your computer and use it in GitHub Desktop.
Fights From Home Revealer
// ==UserScript==
// @name Flights From Home Revealer
// @namespace http://tampermonkey.net/
// @version 2025-01-25
// @description try to take over the world!
// @author itzjonas
// @match https://app.flightsfromhome.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=flightsfromhome.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to remove the target node with specific classes
function removeNode() {
const node = document.querySelector('div.vfm.vfm--inset.vfm--fixed');
if (node) {
node.remove();
console.log('Node removed!');
} else {
console.log('Node not found.');
}
}
// Function to remove overflow: hidden from the body element
function removeOverflow() {
const body = document.querySelector('body');
if (body && body.style.overflow === 'hidden') {
body.style.overflow = ''; // Reset overflow to default value
console.log('Overflow removed from body!');
} else {
console.log('Overflow not set to hidden, no changes made.');
}
}
// Function to remove the 'blur' and 'blur-sm' classes from all elements with those classes
function removeBlurClasses() {
const blurElements = document.querySelectorAll('.blur, .blur-sm'); // Target both blur and blur-sm classes
blurElements.forEach(element => {
element.classList.remove('blur', 'blur-sm'); // Remove both 'blur' and 'blur-sm' classes
console.log('Blur or Blur-sm class removed from element!');
});
}
// Run the functions once the page is loaded
window.addEventListener('load', () => {
removeNode();
removeOverflow();
removeBlurClasses();
});
// Optionally, run all functions at regular intervals to catch dynamically loaded content
setInterval(() => {
removeNode();
removeOverflow();
removeBlurClasses();
}, 3000); // Check every 3 seconds
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment