< script >
function fuck_banner () {
if (! document .getElementById ( 'footer' )) {
return ;
}
$ clear (fb_int);
$$ ( '.banner' ) .each ( function (el) {
el.setStyle ( 'display' , 'none' );
});
if ($ ( 'main-page' ) .getElement ( 'object' )) {
$ ( 'main-page' ). getElement ( 'object' ) .setStyle ( 'display' , 'none' );
} else {
var a_banner = $ ( 'main-page' ). getElement ( 'a' );
if (a_banner.href! = 'http://habrahabr.ru' ) {
$ ( 'main-page' ). getElement ( 'a' ) .setStyle ( 'display' , 'none' );
}
}
}
')
var fb_int = setInterval ( "fuck_banner ();" , 1000);
</ script >
* This source code was highlighted with Source Code Highlighter .
< script >
setTimeout ( "set_key_controller ();" , 1010);
function set_key_controller () {
if (! document .getElementsByTagName ( 'head' ) .length) {
setTimeout ( "set_key_controller ();" , 1010);
return ;
}
var links = document .getElementsByTagName ( 'link' );
for ( var n = 0; n <links.length; n ++) {
if (links [n] .type == 'application / rss + xml' ) {
feed_url = links [n] .href;
document .getElementsByTagName ( 'body' ) [0] .onkeydown = 'key_controller ()' ;
return ;
}
}
}
function key_controller () {
// 192 and 1025 - correspond to the button `(g)
if ( event .keyCode == 192 || event .keyCode == 1025) {
var url = 'http://www.google.com/reader/view/feed/' + feed_url;
window.open (url, '' , 'resizable = yes, location = no, menubar = no, scrollbars = yes, status = no, toolbar = no, fullscreen = no, dependent = no, width = 1015, height = 600, left = 100, top = 100, status' );
}
}
</ script > This code was highlighted with Source Code Highlighter .
Source: https://habr.com/ru/post/37870/
All Articles