Skip to content

Instantly share code, notes, and snippets.

@x-magic
Last active November 9, 2018 22:44
Show Gist options
  • Save x-magic/147628d7a2dbc1f21cbae7f30035502d to your computer and use it in GitHub Desktop.
Save x-magic/147628d7a2dbc1f21cbae7f30035502d to your computer and use it in GitHub Desktop.
Make Readhub.me wider when sponsors are being removed by AdBlock
// ==UserScript==
// @name Widen Readhub.me
// @namespace https://readhub.me/
// @version 0.1.1.1
// @description Make Readhub.me wider when sponsors are being removed by AdBlock
// @author Some guy
// @run-at document-start
// @match https://readhub.me/*
// @match https://readhub.cn/*
// @updateURL https://gist.githubusercontent.com/x-magic/147628d7a2dbc1f21cbae7f30035502d/raw/WidenReadhubMe.user.js
// @downloadURL https://gist.githubusercontent.com/x-magic/147628d7a2dbc1f21cbae7f30035502d/raw/WidenReadhubMe.user.js
// ==/UserScript==
(function () {
'use strict';
var userscriptCSS = 'div[class^="content___"]{max-width:none!important}',
userscriptHead = document.head || document.getElementsByTagName('head')[0],
userscriptStyle = document.createElement('style');
userscriptStyle.type = 'text/css';
if (userscriptStyle.styleSheet) {
userscriptStyle.styleSheet.cssText = userscriptCSS;
} else {
userscriptStyle.appendChild(document.createTextNode(userscriptCSS));
}
userscriptHead.appendChild(userscriptStyle);
})();
//You will need to add following AdBlock rules to make this work:
//readhub.me##[class^="side___"]
//readhub.cn##[class^="side___"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment