您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Slide your tags like a boss!
当前为
// ==UserScript== // @name Wykop tag slider // @namespace http://tampermonkey.net/ // @version 1.0 // @description Slide your tags like a boss! // @author @incognito_man // @match http://www.wykop.pl/* // @grant GM_setValue // @grant GM_getValue // @grant GM_xmlhttpRequest // ==/UserScript== /* jshint -W097 */ 'use strict'; var $rightArrow = $('<div id="x-next-tag" style="position: fixed;top: 30%; right: 0; height: 100%; z-index: 1000"><a href="#"><img src="http://www.richardsolomon.com/promotions/flow/arrow_right.png"></a></div>'), refreshUrl = $('.notification.m-tag .hashtag.ajax').data('ajaxurl') +'/hash/' + wykop.params.hash; GM_xmlhttpRequest({ method: "GET", url: refreshUrl, onload: function(response) { var data = JSON.parse(response.responseText.substr(8)); var html = data.operations[0].data.html; var lastUnreadEntry = $(html).find('li.type-light-warning a:last-child')[0]; if(response.status == 200 && lastUnreadEntry != undefined) { var entryUrl = $(lastUnreadEntry).attr('href'); $rightArrow.find('a').attr('href', entryUrl); $(document.body).append($rightArrow); $(document).keydown(function (e) { if(e.keyCode == 39 && document.body == e.target) { document.location = entryUrl; } }); } } });