Last active
September 15, 2019 14:51
-
-
Save chriskyfung/0b468ae4258ce677c232ddfdc31ca4f6 to your computer and use it in GitHub Desktop.
User script for browsers to filter outdated plugins in wordpress.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Filter WordPress Outdated Plugins | |
// @namespace wordpress | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Chris K. Fung | |
// @match https://wordpress.org/plugins/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.onload = function (){ | |
var testedWith_span = document.getElementsByClassName('tested-with'); | |
for (let i = 0; i < testedWith_span.length; i++) { | |
if (testedWith_span[i].innerText.trim() < "Tested with 5.2.0") { | |
testedWith_span[i].parentNode.parentNode.style.display = "none"; | |
console.log('hidden'); | |
}; | |
}; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment