您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Dieses Script klappt alle Einträge in der "Meine Projecte" Liste ein
当前为
- // ==UserScript==
- // @name Proxer-Subs/Scans -- UserScript
- // @namespace
- // @version 1.0
- // @description Dieses Script klappt alle Einträge in der "Meine Projecte" Liste ein
- // @author Dominik Bissinger alias Nihongasuki
- // @include http://proxer.me/*
- // @include https://proxer.me/*
- // @include http://www.proxer.me/*
- // @include https://www.proxer.me/*
- // @run-at document-start
- // ==/UserScript==
- document.addEventListener('DOMContentLoaded', function(event) {
- $(document).ajaxSuccess (function () {
- main();
- });
- main();
- });
- var table = [];
- var main = function () {
- if (window.location.href.indexOf('subs?s=my') === -1 || window.location.href.indexOf('forum') > -1) {return;};
- if (document.getElementsByClassName('hideButton').length !== 0) {return;};
- var style = document.createElement('style');
- style.innerHTML = "\
- .hideButton {\
- height: 20px; \
- border-style: solid;\
- border-width: 1px; \
- padding: 5px; \
- border-radius: 10px;\
- }\
- ";
- document.head.appendChild(style);
- var inner = document.getElementsByClassName('inner')[0];
- var div = inner.getElementsByTagName('div');
- var a = [];
- var aString = [];
- table = [];
- for (var i = 0; i < div.length; i++) {
- table[i] = div[i].getElementsByTagName('table')[0];
- table[i].style.display = "none";
- var hr = div[i].getElementsByTagName('hr')[0];
- var br = document.createElement('br');
- var newSpan = document.createElement('span');
- var img = document.createElement('img');
- img.setAttribute ("class","hideButton");
- img.setAttribute ("id","showState"+i);
- img.setAttribute ("style","display: inline; position: relative; top: 10px; left: 5px;");
- if (div[i].getElementsByClassName('nextState').length !== 0 || div[i].getElementsByClassName('prevState').length !== 0) {
- img.src = "/images/misc/offlineicon.png";
- }else{
- img.src = "/images/misc/onlineicon.png";
- };
- newSpan.setAttribute ("class","hideButton");
- newSpan.setAttribute ("id","hideButton"+i);
- newSpan.setAttribute ("style","cursor: pointer; display: inline;");
- newSpan.innerHTML = "Tabelle anzeigen";
- div[i].insertBefore(newSpan,hr);
- div[i].insertBefore(img,hr);
- div[i].appendChild(br);
- document.getElementById('hideButton'+i).addEventListener("click",function () {
- showHide(this.id);
- })
- };
- //setStyle of Buttons
- var color = "";
- var setStyle = function () {
- for (var i = 0; i < 4; i++) {
- if (color === "gray") {
- var buttons = document.getElementsByClassName('hideButton');
- for (var j = 0; j < buttons.length; j++) {
- buttons[j].style.backgroundColor = "#5E5E5E";
- buttons[j].style.borderColor = "#FFF";
- };
- }else if (color === "black") {
- var buttons = document.getElementsByClassName('hideButton');
- for (var j = 0; j < buttons.length; j++) {
- buttons[j].style.backgroundColor = "#000";
- buttons[j].style.borderColor = "#FFF";
- };
- }else if (color === "old_blue") {
- var buttons = document.getElementsByClassName('hideButton');
- for (var j = 0; j < buttons.length; j++) {
- buttons[j].style.backgroundColor = "#F3FBFF";
- buttons[j].style.borderColor = "#000";
- };
- }else{
- var buttons = document.getElementsByClassName('hideButton');
- for (var j = 0; j < buttons.length; j++) {
- buttons[j].style.backgroundColor = "#F3FBFF";
- buttons[j].style.borderColor = "#000";
- };
- };
- };
- };
- //Read Cookie
- var name = "style=";
- var cookieCheck = function () {
- var ca = document.cookie.split(';');
- for (var i = 0; i < ca.length; i++) {
- var c = ca[i];
- while (c.charAt(0) === " ") {
- c = c.substring(1);
- };
- if (c.indexOf(name) == 0) {
- color = c.substring(name.length,c.length);
- setStyle();
- };
- };
- if (color === "") {
- cookieCheck();
- };
- };
- cookieCheck();
- };
- var showHide = function (id) {
- var i = id.substring(10);
- if (table[i].style.display === "none") {
- table[i].style.display = "inline";
- document.getElementById(id).innerHTML = "Tabelle ausblenden";
- document.getElementById("showState"+i).style.display = "none";
- }else{
- table[i].style.display = "none";
- document.getElementById(id).innerHTML = "Tabelle anzeigen";
- document.getElementById("showState"+i).style.display = "inline";
- };
- };