Skip to content

Instantly share code, notes, and snippets.

@botmtl
Last active August 31, 2018 15:15
Show Gist options
  • Save botmtl/c5fd1c1d7fc8c3f503cfc0825cb9dfdc to your computer and use it in GitHub Desktop.
Save botmtl/c5fd1c1d7fc8c3f503cfc0825cb9dfdc to your computer and use it in GitHub Desktop.
Userscripts for sites
// ==UserScript==
// @name baramangaonline
// @namespace baramangaonline
// @include *://baramangaonline.com/*
// @match *://baramangaonline.com/*
// @match *://baramangaonline.com/*
// @icon data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAeAB4AwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5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U1JrZiaT3HyyvO2ZHaQ+rEmm0Zopbj9AoozRSAKKM0UwCijNFABRRRSAKKKKYBRRRQAUUUlAC0UUUgCiiigAooooAKKKKACiiigAooopgFGMHpRRRYQUUUUDCiiigAooopAFFFFABRRRQB/9k=
// @grant GM_addCSS
// ==/UserScript==
function unRegisterAllEventListeners(obj) {
if ( typeof obj._eventListeners == 'undefined' || obj._eventListeners.length == 0 ) {
return;
}
for(var i = 0, len = obj._eventListeners.length; i < len; i++) {
var e = obj._eventListeners[i];
obj.removeEventListener(e.event, e.callback);
}
obj._eventListeners = [];
}
var t = document.querySelectorAll(".sidebar");
for (var i=0; i<t.length; i++){
t[i].style="display:none;";
}
unRegisterAllEventListeners(document);
unRegisterAllEventListeners(window);
unRegisterAllEventListeners(document.getElementsByTagName("body")[0]);
if (window.location.href.includes('wp-content/uploads')) {
Array.from(document.getElementsByTagName('a')).forEach(
function(e){
e.innerHTML = e.href.replace(/%.{2}/gi,' ').replace(/\s+/,' ').replace('http://http://baramangaonline.com/wp-content/uploads/','');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment