Greasy Fork Theme figuccio

Greasy Fork pagina colorata

当前为 2022-02-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Greasy Fork Theme figuccio
  3. // @namespace https://greasyfork.org/users/237458
  4. // @description Greasy Fork pagina colorata
  5. // @include https*://*greasyfork.org*
  6. // @include https*://sleazyfork.org*
  7. // @version 2.2
  8. // @noframes
  9. // @author figuccio
  10. // @grant GM_addStyle
  11. // @grant GM_setValue
  12. // @grant GM_getValue
  13. // @grant GM_registerMenuCommand
  14. // @match *://greasyfork.org/*/script_versions/new*
  15. // @match *://greasyfork.org/*/scripts/*/versions/new*
  16. // @require https://gitcdn.link/repo/fuzetsu/userscripts/b38eabf72c20fa3cf7da84ecd2cefe0d4a2116be/wait-for-elements/wait-for-elements.js
  17. // @run-at document-start
  18. // @grant GM_openInTab
  19. // @grant GM_xmlhttpRequest
  20. // @icon https://www.google.com/s2/favicons?domain=greasyfork.org
  21. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
  22. // @license MIT
  23. // ==/UserScript==
  24. window.onload = function() {
  25. var currentColor = 'violet';
  26. setInterval(function() {
  27. document.body.style.backgroundColor = currentColor;
  28. currentColor = currentColor === '#28768e75' ? '#008000ab' : '#28768e75';
  29. }, 5000);
  30. };
  31. //input casella ricerca script rossa
  32. GM_addStyle('.sidebar-search input{background-color:red!important;}');
  33. //colore parte centrale
  34. GM_addStyle('.script-list{background-color:#d4c515d1!important;}');
  35. //mostra risultato per tutte le lingue
  36. if (document.URL == "https://greasyfork.org/it/scripts") window.location.href = "https://greasyfork.org/it/scripts?filter_locale=0";
  37. if (document.URL == "https://sleazyfork.org/it/scripts" ) window.location.href = "https://sleazyfork.org/it/scripts?filter_locale=0";
  38. /*
  39. //autoclick pagina successiva
  40. $(window).scroll(function() {
  41. if($(window).scrollTop() + $(window).height() == $(document).height()) {
  42. var class_name = "next_page";
  43. var bt = document.getElementsByClassName(class_name)[0];
  44. bt.click();
  45. }
  46. });
  47. */
  48. //autoclick pagina successiva
  49. $(window).scroll(function() {
  50. if($(window).scrollTop() + $(window).height() == $(document).height()) {
  51. // setTimeout(function(){
  52. document.querySelector("body > div > div > div.sidebarred-main-content > div.pagination > a.next_page").click();//}, 2000);
  53. }
  54. });
  55. /////////////autoclick casella editor checkbox
  56. (() => {
  57. 'use strict';
  58. waitForElems({
  59. sel: '#enable-source-editor-code',
  60. stop: true,
  61. onmatch(checkbox) {
  62. checkbox.click();
  63. }
  64. });
  65. })();
  66.  
  67. // titolo degli script normalmente e rosso
  68. //GM_addStyle('.script-link, .user-link{color:blue!important;}');
  69. //colore nero descrizione script necessario perche se no lo scroll dark lo fara vedere bianco e non si vedra
  70. GM_addStyle('body, input, select {color:black!important;}');
  71. //////////////////codice sorgente colorato//////////////////////////////////////////////////////////////
  72. GM_addStyle('pre.prettyprint {background-color:#92ad92!important;border: 2px solid red!important;}');//1 stesso colore
  73. GM_addStyle('li.L1, li.L3, li.L5, li.L7, li.L9 {background-color:#92ad92!important;}');//2 stesso colore
  74. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  75. //parte superiore codice sorgente colorata
  76. GM_addStyle('#script-info {border: 2px solid blue!important;background-color:aquamarine!important;}');
  77. //scrool dark
  78. var meta = document.createElement('meta');
  79. meta.name = "color-scheme";
  80. meta.content = "light dark";
  81. document.getElementsByTagName('head')[0].appendChild(meta);
  82.