Created
April 4, 2015 17:57
-
-
Save ermandir/2b516faa2775035488a6 to your computer and use it in GitHub Desktop.
Этот скрипт для чтения статей на odnako.org AdBlockPlus вызывал нескончаемую загружку страницы. И именно потому я сделал этот скрипт.
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 odnako.org | |
// @namespace test.odnako.org | |
// @version v.0.01 | |
// @description Этот скрипт для чтения статей на odnako.org AdBlockPlus вызывал нескончаемую загружку страницы. И именно потому я сделал этот скрипт. | |
// @exclude http://*.odnako.org/ | |
// @include http://*.odnako.org/blogs/* | |
// @grant none | |
// ==/UserScript== | |
function getElementByXpath(path) { | |
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
} | |
var laside = getElementByXpath('//html[1]/body[1]/div[1]/aside[1]'); | |
var shadow = getElementByXpath('//html[1]/body[1]/div[1]/div[1]'); | |
var aside = getElementByXpath('//html[1]/body[1]/div[1]/div[1]/section[1]/aside[1]'); | |
var article = getElementByXpath('//html[1]/body[1]/div[1]/div[1]/section[1]/article[1]'); | |
var text = getElementByXpath('//html[1]/body[1]/div[1]/div[1]/section[1]/article[1]/div[4]'); | |
laside.style.visibility = 'hidden'; | |
aside.style.visibility = 'hidden'; | |
aside.style.position = 'absolute'; | |
article.style.width = '99%'; | |
text.style.columns = '3 20px'; | |
shadow.style.boxShadow = '0px 0px 2px 2px rgba(0, 0, 0, 0.5), 0px 0px 10px 5px rgba(0, 0, 0, 0.3)'; | |
//alert(aside.innerHTML); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment