Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name HabrEnhancer
- // @namespace dotneter
- // @include http://habrahabr.ru/*
- // @version 1.2
- // ==/UserScript==
- var h1 = document.querySelector("h1");
- if (h1 && h1.innerHTML == "Доступ к публикации закрыт") {
- var link = "http://webcache.googleusercontent.com/search?q=cache:" + window.location;
- h1.innerHTML += " <a href='" + link + "'>[Google Cache]</a>";
- var link = window.location.toString();
- link = link.replace(/(habrahabr.ru\/post\/)(\d+)\//, 'savepearlharbor.com/?p=$2');
- h1.innerHTML += " <a href='" + link + "'>[SavePearlHarbor]</a>";
- var link = window.location.toString();
- link = link.replace(/(habrahabr.ru\/post\/)(\d+)\//, 'sohabr.ru/post/$2/');
- h1.innerHTML += " <a href='" + link + "'>[SoHabr]</a>";
- } else {
- // быстрый доступ к трекеру
- $('a.logo[href="http://habrahabr.ru/feed/habred/"]').attr('href', 'http://habrahabr.ru/tracker/');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement