You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scripts/javascript/Floatplane-FilterVideos.js

35 lines
1.2 KiB

// ==UserScript==
// @name Remove Floatplane Non-Exclusive Content
// @namespace http://www.floatplane.com
// @version 0.1
// @description Hides non-exclusive content (I watch that stuff on youtube)
// @author WTMike24
// @match https://www.floatplane.com/
// @icon https://www.google.com/s2/favicons?domain=floatplane.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
let menubar=document.getElementsByClassName('ReactProfileNavIconsContainer')[0];
let cleanupbutton=document.createElement('div');
cleanupbutton.classList.add("ReactProfileNavItem");
cleanupbutton.onclick=clean;
cleanupbutton.innerHTML="<span>FP Exclusive Filter</span>";
menubar.appendChild(cleanupbutton);
function clean() {
document.getElementsByClassName('ReactElementGridItem').forEach(
function(element){
let _title=element.children[0].children[1].children[1].children[0].innerText;
if (!_title.includes('Floatplane') && !_title.includes('FP Exclusive')){
console.log('removing'+_title);
element.remove();
}
}
);
}
})();