Remove annoying reminder when using reddit mobile webpage!
Verze ze dne
// ==UserScript==
// @name Reddit Mobile Enhancer
// @namespace https://greasyfork.org/users/28298
// @version 1.1
// @description Remove annoying reminder when using reddit mobile webpage!
// @author Jerry
// @grant GM_addStyle
// @match *://www.reddit.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @license GNU GPLv3
// @require https://greasyfork.org/scripts/456410-gmlibrary/code/GMLibrary.js
// ==/UserScript==
(function() {
'use strict';
// setTimeout(function() {
// var button = findx('//button[text()="Continue"]');
// if (button !== null) {
// button.click();
// // triggerevent(button,'click'); // weird, not working.
// }
// }, 2000);
// a better solution, inspired by
// https://greasyfork.org/en/scripts/36031-view-reddit-in-the-app-mobile-pop-up-remover/code
localStorage.setItem('xpromo-consolidation', new Date());
// https://github.com/Shawak/TwitchSquad/blob/main/twitchsquad.user.js
if (typeof GM_addStyle === "undefined") {
GM_addStyle = function (css) {
let head = document.getElementsByTagName("head")[0],
style = document.createElement("style");
if (!head) {
return;
}
style.type = "text/css";
try {
style.innerHTML = css;
} catch (x) {
style.innerText = css;
}
head.appendChild(style);
};
}
GM_addStyle(`
.XPromoBottomBar.m-consolidate { display: none !important; visibility:hidden !important; max-height: 0 !important; max-width: 0 !important; height: 0 !important; width: 0 !important; }
`);
// var links = document.getElementsByClassName('bti-job-detail-link');
// var links = document.links;
// for (var i = 0; i < links.length; i++){
// links[i].target="_blank";
// }
// document.documentElement.innerHTML
})(); // end of main function