Guest User

dd

a guest
Jun 15th, 2015
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. // ==UserScript==
  2. // @name WYPOK.PL TOOLS
  3. // @version 1.0
  4. // @description :)
  5. // @match http*://*.wykop.pl/*
  6. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
  7. // @require http://code.jquery.com/ui/1.9.2/jquery-ui.js
  8. // ==/UserScript==
  9. jQuery(function($){
  10. var _highest = 0;
  11. $("div").each(function() {
  12. var _current = parseInt($(this).css("zIndex"), 10);
  13. if(_current > _highest) {
  14. _highest = _current + 1;
  15. }
  16. });
  17. $('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>');
  18. $('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>');
  19. $('body').append('<script> function minus() {javascript:$('.comments-stream .more:not(.dnone)').parent().find('.fa-minus').parent() .click();} </script>');
  20. $( "#draggableDiv" ).draggable();
  21. $('#draggableDiv').mouseup(function() {
  22. var divOffset = $("#draggableDiv").offset();
  23. var left = divOffset.left;
  24. var top = divOffset.top;
  25. GM_setValue("left", left);
  26. GM_setValue("top", top);
  27. });
  28. });
Advertisement
Add Comment
Please, Sign In to add comment