Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Wykop - Fullscreen Mikro
- // @description Mikroblog na całą szerokość ekranu.
- // @author Patryk "Linux__Shines" N.
- // @version 1.0.0.0
- // @include http://wykop.pl/tag/*
- // ==/UserScript==
- var vis = "visible";
- var invis = "invisible";
- var title = "Przełącz belkę";
- var action = "click";
- var bar_title = "ChangeBar";
- var click_type = "a";
- var wrap_size = 4;
- var main = $("<li><" + click_type + " id='" + bar_title + "' title='" + title + "'>" + title + "</" + click_type + "></li>").insertBefore($("#openNaturalSearch").parent());
- var bar = $(".grid-right");
- var grid = $(".grid-main");
- var wrap = grid.parent();
- var check_site = function CheckURL(url) {
- if(url === url.match("/http:\/\/www.wykop.pl/i")) {
- alert("TEST");
- }
- }
- var steering = {
- Show: function() {
- bar.show();
- grid.css("width", "auto");
- wrap.css("padding-right", wrap_size + "px");
- localStorage.BarStatus = vis;
- },
- Hide: function() {
- bar.hide();
- grid.css("width", "100%");
- wrap.css("padding-right", 0);
- localStorage.BarStatus = invis;
- }
- };
- localStorage.BarStatus = localStorage.BarStatus || vis;
- localStorage.BarStatus == vis? steering.Hide(): steering.Show();
- main.on(action, function() {
- localStorage.BarStatus == vis? steering.Hide(): steering.Show();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement