Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Программы » Расширения для Google Chrome (Google Chrome Extensions)

Модерирует : gyra, Maz

articlebot (26-05-2016 18:55): Расширения для Google Chrome (Google Chrome Extensions)  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

TheBarmaley_TMP



Silver Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
// ==UserScript==
// @name       Undirect + Open external links in new tab
// @namespace  http://stevesspace.com/
// @version    1.1.3
// @description  Removes this tracking and redirection from google search results
// @include      /^https?.\/\/.+google[^\/]*/
// @copyright  2014+, Steve Leigh
// @grant       none
// @run_at      document_end

// ==/UserScript==
 
(function() {
    var googlePagesPattern = /https?.\/\/.+google[^\/]*/gi;
    if (!document.location.href.match(googlePagesPattern))
        return;
 
    var scriptToExecute = (function() {
        var expectedRwt = function() { return true; };
 
        var replaceRwtFunction = function() {
            if (window.rwt && window.rwt != expectedRwt) {
                delete window.rwt;
                Object.defineProperty(window, 'rwt', {
                    value: expectedRwt,
                    writable: false
                });
            }
        };
 
        replaceRwtFunction();
 
        var timeoutId = 0;
        document.body.addEventListener("DOMNodeInserted", function() {
            if (timeoutId) clearTimeout(timeoutId);
            timeoutId = setTimeout(replaceRwtFunction, 1000);
        }, false);
    });
 
    // Write script to page - since plugins often work in an isolated world, this gives us the
    // ability to replace javascript added by the page
    var fnContents = scriptToExecute.toString();
    var executeFnScript = '(' + fnContents + ')();';
 
    var script = document.createElement('script');
    script.textContent = executeFnScript;
    (document.head || document.documentElement).appendChild(script);
    script.parentNode.removeChild(script);
})();
(function() {
    var a=0, c=document.getElementsByTagName('a');
    for(a; a<c.length; a++) { if (c[a].getAttribute('href') && c[a].hostname !== location.hostname) c[a].target = '_blank'; }
})();

Всего записей: 4230 | Зарегистр. 10-11-2015 | Отправлено: 14:16 04-01-2016
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Программы » Расширения для Google Chrome (Google Chrome Extensions)
articlebot (26-05-2016 18:55): Расширения для Google Chrome (Google Chrome Extensions)


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru