Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name WYPOK.PL TOOLS
- // @version 1.0
- // @description :)
- // @match http*://*.wykop.pl/*
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
- // @require http://code.jquery.com/ui/1.9.2/jquery-ui.js
- // ==/UserScript==
- jQuery(function($){
- var _highest = 0;
- $("div").each(function() {
- var _current = parseInt($(this).css("zIndex"), 10);
- if(_current > _highest) {
- _highest = _current + 1;
- }
- });
- $('body').append('<div id = "draggableDiv" class = "ui-widget-content" style="position:absolute;top:'+GM_getValue("top")+'px;z-index:'+_highest+';left:'+GM_getValue("left")+'px;background:#2c2c2c;border:10px solid #333333;border-radius:15px;height:170px;width:80px;"><center><b>WYPOK TOOLS<br><input type="button" style=" width:54px; height:54px; background:url(http://i.imgur.com/OAzlfST.png)" onclick="plus()"><br><input type="button" style=" width:54px; height:54px; background:url(http://i.imgur.com/nleX6ao.png)" onclick="minus()"></center></b></div>');
- $('body').append('<script> function plus() {javascript:(function(){function plusuj(selector) {var $plusArea = $(selector);$.each($plusArea, function(i, $val) {if(!$($val).find("b").hasClass("voted")) {$($val).find("a").click();}});}plusuj("#itemsStream > li > ul > li > div > div > div.author.ellipsis > p");plusuj("#itemsStream > li > div > div > div.author.ellipsis > p");})();} </script>');
- $('body').append('<script> function minus() {javascript:$('.comments-stream .more:not(.dnone)').parent().find('.fa-minus').parent() .click();} </script>');
- $( "#draggableDiv" ).draggable();
- $('#draggableDiv').mouseup(function() {
- var divOffset = $("#draggableDiv").offset();
- var left = divOffset.left;
- var top = divOffset.top;
- GM_setValue("left", left);
- GM_setValue("top", top);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment