您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to toggle the display of unavailable books on the wishlist and search results pages.
当前为
// ==UserScript== // @name Moochable book filter for Bookmooch mobile // @namespace bookmooch // @version 0.1 // @description Adds a button to toggle the display of unavailable books on the wishlist and search results pages. // @include /^http://(fr|jp|pt)\.bookmooch\.com/mobile/m/(wishlist|search_do).*$/ // @include /^http://bookmooch\.(com|de|es|it|se)/mobile/m/(wishlist|search_do).*$/ // @grant none // ==/UserScript== window.show_moochable = false; var heart = document.createElement("span"); heart.appendChild(document.createTextNode("\u2665 ")); heart.setAttribute("id", "heartToggle"); heart.setAttribute("title", "Toggle moochable filter"); var header = document.getElementById('pageTitle'); header.insertBefore(heart, header.firstChild); heart.addEventListener("click", toggleFilter, true); function toggleFilter() { var lis = document.getElementsByTagName('li'); window.show_moochable = !window.show_moochable; var display = window.show_moochable ? 'none' : 'block'; for (i = 0; i < lis.length; i++) { if (lis[i].firstChild.firstChild.textContent != '\u2665') lis[i].style.display = display; } document.getElementById("heartToggle").style.color = window.show_moochable ? "#FF0000" : "inherit"; }