Created
December 30, 2015 20:17
-
-
Save spmbt/91b3f46a89154f1be2a3 to your computer and use it in GitHub Desktop.
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 hideCompanies | |
// @description Hiding texts of annotations Companies in habra-sites; but main feature is method to load and execute of jQuery or similar external script" | |
// @include /^https?://(m\.|webcache\.googleusercontent\.com\/search\?q=cache(:|%3A|%3a)(http(:|%3A|%3a)(\/|%2F|%2f)(\/|%2F|%2f))?)?(habrahabr|geektimes|megamozg).ru(?!\/special|\/api)/ | |
// @version 1.2015.12.29 | |
// ==/UserScript== | |
(function(u,f){var d=document,g=d.body,v='script',s=d.createElement(v),t=d.createElement(v);t.setAttribute('src',u); | |
s.textContent=typeof f=='function'?'('+f+')();':f;s&&t.addEventListener('load',s);g.appendChild(s);g.appendChild(t)}) //loadAndExecute | |
("http://habracdn.net/habr/javascripts/1451404110/assets/global_main.js", function(){ | |
$('.post .post_title[href*="/company/"]').each(function(){ | |
$(this).parents('.post').addClass('isCorporate').find('.content').hide(); | |
}); | |
}); |
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
{ // file for loading hideCompanies.user.js as unpacked extension for Chrome browser | |
"content_scripts": [ { | |
"exclude_globs": [ "http://habrahabr.ru/api/*" ], | |
"include_globs": [ "http://habrahabr.ru/*", "https://habrahabr.ru/*", "http://geektimes.ru/*", "http://megamozg.ru/*", "https://geektimes.ru/*", "https://megamozg.ru/*", "http://webcache.googleusercontent.com/search?q=cache:http://habrahabr.ru/*", "http://webcache.googleusercontent.com/search?q=cache:http://geektimes.ru/*" ], | |
"js": [ "hideCompanies.user.js" ], //name of userscript file in same folder as this file manifest.json | |
"matches": [ "http://*/*", "https://*/*" ], | |
"run_at": "document_idle" | |
} ], | |
"converted_from_user_script": true, | |
"description": "hideCompanies", | |
"name": "hideCompaniesFx", //any name for list of scripts in Chrome extensions | |
"version": "1.2015.12.29", | |
"manifest_version": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Comments for this script are here: http://habrahabr.ru/post/274219/#comment_8721801