NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Decorator
// @description Decorates the page of the broadcast
// @version 2.0
// @author Max Max
// @license MIT
// @include http://smotri.com/live/*/
// @include http://*/live/*/
// @match http://smotri.com/live/*/
// @match http://*/live/*/
// @icon http://i58.tinypic.com/1tpu1l.png
// @run-at document-end
// @grant none
// ==/UserScript==
// [1] не запускаем скрипт во фреймах
if (window.self != window.top) {return;}
// [2] дополнительная проверка для хрома
if (!window.location.href.match(/\/live\//)) {return;}
// [3] не хлопаем ушами - без регистрации выход
if (!document.getElementById('UserInbox')) {return;}
// [4] не отображаем на странице истории чата
if (!document.getElementById('flashcontent')) {return;}
////
// ф-ия подключения скрипта
function addScript(src, callback) {
// блок переменных
var script = document.createElement('script'),
s = document.getElementsByTagName('script')[0],
loaded = false;
// флаг загрузки и callback
function onload() {
// повторный вызов
if (loaded) return;
loaded = true;
callback();
} // end of function
script.type = 'text/javascript';
script.src = src+'?'+Math.random();
s && s.parentNode.insertBefore(script, s);
// все браузеры, IE >= 9
script.onload = onload;
} // end of function
////
// подключение скрипта
addScript("https://dl.dropboxusercontent.com/s/03hhj5idulg3g17/DecoratorAPI20.js", function() { share_Css(); });
// end //