Greasy Fork is available in English.

Script Finder Recherche de script GreasyFork

Script Finder Rechercher sur n’importe quel site Web qui s’applique à ce site Web Script de GreasyFork。

Installer ce script?
Script suggéré par l'auteur

Vous pourriez également aimer Greasyfork Artisan de la colle.

Installer ce script
  1. // ==UserScript==
  2. // @name Script Finder+
  3. // @name:zh-CN Script Finder 油猴脚本查找
  4. // @description:zh-CN Script Finder 在任何网站上找到适用于该网站的 油猴脚本。
  5. // @name:ar Script Finder البحث عن نص قرد الشحوم
  6. // @description:ar Script Finder ابحث في أي موقع ويب ينطبق على هذا الموقع سيناريو القرد الشحوم。
  7. // @name:bg Script Finder Търсене на скрипт на GreasyFork
  8. // @description:bg Script Finder Намерете във всеки уебсайт, който се отнася за този уебсайт GreasyFork Script。
  9. // @name:cs Script Finder Vyhledávání skriptů GreasyFork
  10. // @description:cs Script Finder Vyhledejte na libovolném webu, který se tohoto webu týká GreasyFork Script。
  11. // @name:da Script Finder GreasyFork Script-opslag
  12. // @description:da Script Finder Find på ethvert websted, der gælder for det pågældende websted GreasyFork Script。
  13. // @name:de Script Finder Nachschlagen von GreasyFork-Skripten
  14. // @description:de Script Finder Finden Sie auf jeder Website, die für diese Website gilt GreasyFork-Skript。
  15. // @name:el Script Finder Αναζήτηση σεναρίου GreasyFork
  16. // @description:el Script Finder Βρείτε σε οποιονδήποτε ιστότοπο που ισχύει για αυτόν τον ιστότοπο Σενάριο GreasyFork。
  17. // @name:en Script Finder GreasyFork Script Lookup
  18. // @description:en Script Finder Find on any website that applies to that website GreasyFork Script。
  19. // @name:eo Script Finder GreasyFork Skripto Serĉo
  20. // @description:eo Script Finder Trovu en iu ajn retejo kiu validas por tiu retejo GreasyFork Skripto。
  21. // @name:es Script Finder Búsqueda de guiones de GreasyFork
  22. // @description:es Script Finder Busque en cualquier sitio web que se aplique a ese sitio web. Guión del mono de grasa。
  23. // @name:fi Script Finder GreasyFork Script Lookup
  24. // @description:fi Script Finder Etsi miltä tahansa verkkosivustoa, joka koskee kyseistä verkkosivustoa GreasyFork Script。
  25. // @name:fr Script Finder Recherche de script GreasyFork
  26. // @description:fr Script Finder Rechercher sur n’importe quel site Web qui s’applique à ce site Web Script de GreasyFork。
  27. // @name:he Script Finder בדיקת סקריפט של גריז קוף
  28. // @description:he Script Finder מצא בכל אתר הרלוונטי לאותו אתר סקריפט גריז קוף。
  29. // @name:hr Script Finder Traženje skripte GreasyFork
  30. // @description:hr Script Finder Pronađite na bilo kojoj web stranici koja se odnosi na tu web stranicu GreasyFork Script。
  31. // @name:hu Script Finder GreasyFork Script Lookup
  32. // @description:hu Script Finder Keresse meg az adott webhelyre vonatkozó bármely webhelyet GreasyFork Script。
  33. // @name:id Script Finder Pencarian Skrip GreasyFork
  34. // @description:id Script Finder Temukan di situs web mana pun yang berlaku untuk situs web tersebut Naskah Monyet Gemuk。
  35. // @name:it Script Finder Ricerca script GreasyFork
  36. // @description:it Script Finder Trova su qualsiasi sito Web che si applica a quel sito Web Sceneggiatura della scimmia grassa。
  37. // @name:ja Script Finder GreasyFork スクリプトの検索
  38. // @description:ja Script Finder その Web サイトに該当する Web サイトを検索する グリース モンキー スクリプト。
  39. // @name:ka Script Finder GreasyFork სკრიპტის ძიება
  40. // @description:ka Script Finder იპოვეთ ნებისმიერ ვებსაიტზე, რომელიც ეხება ამ ვებსაიტს GreasyFork Script。
  41. // @name:ko Script Finder 그리스 원숭이 스크립트 조회
  42. // @description:ko Script Finder 해당 웹사이트에 적용되는 웹사이트를 찾으세요. 그리스 원숭이 스크립트。
  43. // @name:nl Script Finder GreasyFork-script opzoeken
  44. // @description:nl Script Finder Zoek op elke website wat op die website van toepassing is GreasyFork-script。
  45. // @name:nb Script Finder GreasyFork Script Lookup
  46. // @description:nb Script Finder Finn på et hvilket som helst nettsted som gjelder for det nettstedet GreasyFork Script。
  47. // @name:pl Script Finder Wyszukiwanie skryptu GreasyFork
  48. // @description:pl Script Finder Znajdź na dowolnej stronie internetowej, która dotyczy tej witryny Smaruj skrypt małpy。
  49. // @name:pt-BR Script Finder Pesquisa de script do GreasyFork
  50. // @description:pt-BR Script Finder Encontre em qualquer site que se aplique a esse site Script do Macaco Graxa。
  51. // @name:ro Script Finder Căutare Script GreasyFork
  52. // @description:ro Script Finder Găsiți pe orice site care se aplică acelui site GreasyFork Script。
  53. // @name:ru Script Finder Поиск сценария GreasyFork
  54. // @description:ru Script Finder Найти на любом веб-сайте, который относится к этому веб-сайту Сценарий GreasyFork。
  55. // @name:sk Script Finder Vyhľadávanie skriptov GreasyFork
  56. // @description:sk Script Finder Nájdite na ľubovoľnej webovej lokalite, ktorá sa týka danej webovej lokality GreasyFork Script。
  57. // @name:sr Script Finder Греасе Монкеи Сцрипт Лоокуп
  58. // @description:sr Script Finder Пронађите на било којој веб локацији која се односи на ту веб локацију Греасе Монкеи Сцрипт。
  59. // @name:sv Script Finder GreasyFork Script Lookup
  60. // @description:sv Script Finder Hitta på vilken webbplats som helst som gäller den webbplatsen GreasyFork Script。
  61. // @name:th Script Finder ค้นหาสคริปต์ GreasyFork
  62. // @description:th Script Finder ค้นหาบนเว็บไซต์ใด ๆ ที่ใช้กับเว็บไซต์นั้น สคริปต์ลิงจาระบี。
  63. // @name:tr Script Finder GreasyFork Komut Dosyası Arama
  64. // @description:tr Script Finder Söz konusu web sitesi için geçerli olan herhangi bir web sitesinde bulun GreasyFork Komut Dosyası。
  65. // @name:ug Script Finder مايمۇن قوليازمىسىنى ئىزدەش
  66. // @description:ug Script Finder شۇ تور بېكەتكە ماس كېلىدىغان ھەرقانداق تور بەتنى ئىزدەڭ مايمۇن قوليازمىسى。
  67. // @name:uk Script Finder Пошук сценарію GreasyFork
  68. // @description:uk Script Finder Знайдіть на будь-якому веб-сайті, який стосується цього веб-сайту Сценарій GreasyFork。
  69. // @name:vi Script Finder Tra cứu tập lệnh GreasyFork
  70. // @description:vi Script Finder Tìm trên bất kỳ trang web nào áp dụng cho trang web đó Kịch bản khỉ mỡ。
  71. // @name:zh-TW Script Finder 油猴腳本查找
  72. // @description:zh-TW Script Finder 在任何網站上找到適用於該網站的 油猴腳本。
  73. // @name:zh-HK Script Finder 油猴腳本查找
  74. // @description:zh-HK Script Finder 在任何網站上找到適用於該網站的 油猴腳本。
  75. // @name:fr-CA Script Finder Recherche de script GreasyFork
  76. // @description:fr-CA Script Finder Rechercher sur n’importe quel site Web qui s’applique à ce site Web Script de GreasyFork。
  77. // @description Script Finder allows you to find userscripts from greasyfork on any website.
  78.  
  79. // @namespace https://github.com/ChinaGodMan/UserScripts
  80. // @version 0.1.6.80
  81. // @author shiquda & 人民的勤务员 <china.qinwuyuan@gmail.com>
  82. // @supportURL https://github.com/ChinaGodMan/UserScripts/issues
  83. // @homepageURL https://github.com/ChinaGodMan/UserScripts
  84. // @match *://*/*
  85. // @connect greasyfork.org
  86. // @icon data:image/png;base64,/9j/7gAhQWRvYmUAZIAAAAABAwAQAwIDBgAAAAAAAAAAAAAAAP/bAIQADAgICAkIDAkJDBELCgsRFQ8MDA8VGBMTFRMTGBEMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAENCwsNDg0QDg4QFA4ODhQUDg4ODhQRDAwMDAwREQwMDAwMDBEMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8IAEQgAgACAAwEiAAIRAQMRAf/EANkAAAIDAQEBAQAAAAAAAAAAAAAGBAUHAQIDCAEBAAMBAQEAAAAAAAAAAAAAAAQFBgMCARAAAAYCAQMDAwUBAAAAAAAAAAIDBAUGAQcXECAWETE2EhQ1MEAyMxU3EQABAgMDAwsPCAkFAAAAAAACAQMAEgQREwUikzUQITGRMkJS0iPTBlFicoKSorIzQ2NzFDTUNiBhcVODo7MVMEBBgbHR4yRkoXTE5BYSAAIABAQCCAUFAAAAAAAAAAECABEhEiAxIgMQQTBRYTJSgrLScYGSojOhQmJyE//aAAwDAQECEQMRAAAA1UABbUp8LUTL27l0YhdIsliF0GIXQYhdBiIksKyzWe/FNA0+c9Ns28oLxWGkgTVYaQVhpDHGpXs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I2ZssPKN/h3eGi7W1LuQAqCtgKlrTOm5KWbDVbeB19SaJDFFILLRWbX5LVJ+pwunN01tI0CVVXqldyTRoljvuNGiWO+40aJY77jRoljvuNGiWO+40aJY77jRoljvuNGiWNouNGiWNouNBVFFhtOy8KLK4gIpJ2BnMQfqCjsWoqbce3fdf1o9u+6/rav/2Q==
  87. // @iconbak https://github.com/ChinaGodMan/UserScripts/raw/main/docs/icon/Scripts%20Icons/Finder.jpg
  88. // @grant GM_xmlhttpRequest
  89. // @grant GM_addStyle
  90. // @license MIT
  91.  
  92. // ==/UserScript==
  93. const translate = (function () {
  94. const userLang = (navigator.languages && navigator.languages[0]) || navigator.language || 'en'
  95. const strings = {
  96. 'en': {
  97. Author: 'Author',
  98. Installs: 'Installs',
  99. DailyInstalls: 'Daily Installs',
  100. Created: 'Created',
  101. Updated: 'Updated',
  102. Rating: 'Rating',
  103. LoadingScripts: 'Loading scripts...',
  104. LoadMore: 'Load more',
  105. AllScriptsLoaded: 'All scripts loaded',
  106. SearchPlaceholder: 'Search scripts...',
  107. ViewOnGreasyfork: 'View on Greasyfork',
  108. errorMessage: 'Failed to retrieve script information or there are no available scripts for this domain.',
  109. Loading: 'Loading...',
  110. Scripts: 'Scripts'
  111. },
  112. 'zh-CN': {
  113. Author: '作者',
  114. Installs: '安装数量',
  115. DailyInstalls: '每日安装',
  116. Created: '创建日期',
  117. Updated: '更新时间',
  118. Rating: '评分',
  119. LoadingScripts: '正在加载脚本...',
  120. LoadMore: '加载更多',
  121. AllScriptsLoaded: '所有脚本已加载',
  122. SearchPlaceholder: '搜索脚本...',
  123. ViewOnGreasyfork: '在Greasyfork查看',
  124. errorMessage: '无法检索脚本信息或该域没有可用的脚本。',
  125. Loading: '载入中...',
  126. Scripts: '脚本'
  127.  
  128. },
  129. 'zh-TW': {
  130. Author: '作者',
  131. Installs: '安裝數量',
  132. DailyInstalls: '每日安裝',
  133. Created: '創建日期',
  134. Updated: '更新日期',
  135. Rating: '評分',
  136. LoadingScripts: '正在載入腳本...',
  137. LoadMore: '載入更多',
  138. AllScriptsLoaded: '所有腳本已載入',
  139. SearchPlaceholder: '搜尋腳本...',
  140. ViewOnGreasyfork: '在Greasyfork查看',
  141. errorMessage: '無法檢索腳本信息或該域沒有可用的腳本。',
  142. Loading: '載入中...',
  143. Scripts: '腳本'
  144. },
  145. 'ja': {
  146. Author: '著者',
  147. Installs: 'インストール数',
  148. DailyInstalls: '日次インストール数',
  149. Created: '作成日',
  150. Updated: '更新日',
  151. Rating: '評価',
  152. LoadingScripts: 'スクリプトを読み込んでいます...',
  153. LoadMore: 'もっと読む',
  154. AllScriptsLoaded: 'すべてのスクリプトが読み込まれました',
  155. SearchPlaceholder: 'スクリプトを検索...',
  156. ViewOnGreasyfork: 'Greasyforkで見る',
  157. errorMessage: 'スクリプト情報の取得に失敗するか、またはこのドメインには利用可能なスクリプトがありません。',
  158. Loading: '読み込み中...',
  159. Scripts: 'スクリプト'
  160. },
  161. 'vi': {
  162. Author: 'Tác giả',
  163. Installs: 'Số lượt cài đặt',
  164. DailyInstalls: 'Cài đặt hàng ngày',
  165. Created: 'Ngày tạo',
  166. Updated: 'Ngày cập nhật',
  167. Rating: 'Đánh giá',
  168. LoadingScripts: 'Đang tải các tập lệnh...',
  169. LoadMore: 'Tải thêm',
  170. AllScriptsLoaded: 'Đã tải tất cả các tập lệnh',
  171. SearchPlaceholder: 'Tìm kiếm tập lệnh...',
  172. ViewOnGreasyfork: 'Xem trên Greasyfork',
  173. errorMessage: 'Không thể truy xuất thông tin tập lệnh hoặc không có tập lệnh nào có sẵn cho miền này.',
  174. Loading: 'Đang tải...',
  175. Scripts: 'Tập lệnh'
  176. }
  177. }
  178. // 返回翻译函数
  179. return (id, lang = '') => {
  180. const selectedLang = lang || userLang
  181. return (strings[selectedLang] || strings.en)[id] || strings.en[id]
  182. }
  183. }());
  184. (function () {
  185. const domainParts = window.location.hostname.split('.').slice(-2)
  186. const domain = domainParts.join('.')
  187. const errorMessage = translate('errorMessage')
  188. let neverLoadedScripts = true
  189. let collapsed = true
  190. let loadedPages = 0
  191.  
  192. function getScriptsInfo(domain, page = 1) {
  193. var url = `https://greasyfork.org/scripts/by-site/${domain}?filter_locale=0&sort=updated&page=${page}`
  194.  
  195. GM_xmlhttpRequest({
  196. method: 'GET',
  197. url: url,
  198. onload: (response) => {
  199. // 解析结果
  200. const parser = new DOMParser()
  201. const doc = parser.parseFromString(response.responseText, 'text/html')
  202. const scripts = doc.querySelector('#browse-script-list')?.querySelectorAll('[data-script-id]')
  203. let scriptsInfo = []
  204.  
  205. if (!scripts) {
  206. scriptsInfo = errorMessage
  207. } else {
  208. for (var i = 0; i < scripts.length; i++) {
  209. scriptsInfo.push(parseScriptInfo(scripts[i]))
  210. }
  211. }
  212.  
  213. // 处理对象
  214. const loadMoreButton = document.querySelector('.load-more')
  215. console.log(doc.querySelector('.next_page'))
  216. if (doc.querySelector('.next_page') == null || doc.querySelector('.next_page')?.getAttribute('aria-disabled') === 'true') {
  217. loadedPages = 'max'
  218. loadMoreButton.disabled = true
  219. loadMoreButton.textContent = translate('AllScriptsLoaded')
  220. } else {
  221. loadMoreButton.disabled = false
  222. loadMoreButton.textContent = translate('LoadMore')
  223. }
  224. // console.log(scriptsInfo);
  225. document.querySelector('.wait-loading').style.display = 'none'
  226. loadMoreButton.style.display = 'block'
  227. appendScriptsInfo(scriptsInfo)
  228. updateMatches()
  229.  
  230. loadedPages = typeof loadedPages === 'number' ? loadedPages + 1 : 0
  231. // console.log(loadedPages)
  232. },
  233. onerror: () => {
  234. console.log('Some error occurred!')
  235. if (loadedPages === 0) {
  236. appendScriptsInfo(scriptsInfo)
  237. }
  238. const scriptsInfo = errorMessage
  239. document.querySelector('.wait-loading').style.display = 'none'
  240. }
  241. })
  242. }
  243.  
  244. // 解析脚本信息
  245. function parseScriptInfo(script) {
  246. return {
  247. id: script.getAttribute('data-script-id'),
  248. name: script.getAttribute('data-script-name'),
  249. author: script.querySelector('dd.script-list-author').textContent,
  250. description: script.querySelector('.script-description').textContent,
  251. version: script.getAttribute('data-script-version'),
  252. url: 'https://greasyfork.org/scripts/' + script.getAttribute('data-script-id'),
  253. createDate: script.getAttribute('data-script-created-date'),
  254. updateDate: script.getAttribute('data-script-updated-date'),
  255. installs: script.getAttribute('data-script-total-installs'),
  256. dailyInstalls: script.getAttribute('data-script-daily-installs'),
  257. ratingScore: script.getAttribute('data-script-rating-score')
  258. }
  259. }
  260.  
  261. // 插入脚本
  262. function appendScriptsInfo(scriptsInfo) {
  263. const infoList = document.querySelector('.info-list')
  264. if (scriptsInfo === errorMessage) {
  265. // infoList.innerHTML = errorMessage;
  266. const loadMoreButton = document.querySelector('.load-more')
  267. loadMoreButton.disabled = true
  268. loadMoreButton.textContent = translate('AllScriptsLoaded')
  269. loadMoreButton.innerHTML = errorMessage
  270. } else {
  271. for (var i = 0; i < scriptsInfo.length; i++) {
  272. var script = scriptsInfo[i]
  273. var listItem = document.createElement('li')
  274. listItem.className = 'info-item'
  275.  
  276. var scriptContainer = document.createElement('div')
  277. scriptContainer.className = 'script-container'
  278.  
  279. var nameElement = document.createElement('a')
  280. nameElement.className = 'mscript-link'
  281. nameElement.innerText = script.name
  282. nameElement.href = script.url
  283. nameElement.target = '_blank'
  284.  
  285. var descriptionElement = document.createElement('p')
  286. descriptionElement.className = 'script-description'
  287. descriptionElement.innerHTML = script.description
  288.  
  289. var detailsContainer = document.createElement('div')
  290. detailsContainer.className = 'details-container'
  291.  
  292. // 创建一键安装按钮
  293. var installButton = document.createElement('a')
  294. installButton.className = 'install-button'
  295. installButton.innerText = `Install ${script.version}`
  296. installButton.href = `https://greasyfork.org/scripts/${script.id}/code/script.user.js`
  297.  
  298. const details = [
  299. { key: translate('Author'), value: script.author },
  300. { key: translate('Installs'), value: script.installs },
  301. { key: translate('DailyInstalls'), value: script.dailyInstalls },
  302. { key: translate('Created'), value: script.createDate },
  303. { key: translate('Updated'), value: script.updateDate },
  304. { key: translate('Rating'), value: script.ratingScore }
  305. ]
  306.  
  307. for (let i = 0; i < details.length; i++) {
  308. const spanElement = document.createElement('span')
  309. spanElement.className = 'script-details'
  310. spanElement.innerText = `${details[i].key}:\n${details[i].value}`
  311. detailsContainer.appendChild(spanElement)
  312. }
  313.  
  314. scriptContainer.appendChild(nameElement)
  315. scriptContainer.appendChild(descriptionElement)
  316. scriptContainer.appendChild(detailsContainer)
  317. scriptContainer.appendChild(installButton)
  318.  
  319. listItem.appendChild(scriptContainer)
  320. listItem.scriptId = script.id
  321. infoList.appendChild(listItem)
  322. }
  323. }
  324. }
  325.  
  326. function setupUI() {
  327. GM_addStyle(`
  328. scrbutton.script-button {
  329. position: fixed;
  330. bottom: 20%;
  331. right: -50px;
  332. transform: translateY(50%);
  333. padding: 20px;
  334. font-size: 16px;
  335. border: none;
  336. border-radius: 4px;
  337. background-color: #1e90ff;
  338. color: #ffffff;
  339. cursor: pointer;
  340. transition: right 0.3s;
  341. z-index: 9999999999999999;
  342. }
  343. div.info-container {
  344. display: none;
  345. position: fixed;
  346. top: 50%;
  347. left: 50%;
  348. transform: translate(-50%, -50%);
  349. width: 650px;
  350. padding: 12px;
  351. background-color: #ffffff;
  352. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  353. border-radius: 4px;
  354. opacity: 0;
  355. transition: opacity 0.3s;
  356. z-index: 9999;
  357. max-height: 80vh;
  358. overflow-y: auto;
  359. }
  360. ul.info-list {
  361. list-style: none;
  362. margin: 0;
  363. padding: 0;
  364. }
  365. li.info-item {
  366. margin-bottom: 15px;
  367. padding: 12px;
  368. padding-bottom: 22px;
  369. display: flex;
  370. flex-direction: column;
  371. border: 1px solid #1e90ff;
  372. border-radius: 5px;
  373. }
  374. .div.script-container {
  375. display: flex;
  376. flex-direction: column;
  377. }
  378. a.mscript-link {
  379. font-size: 18px !important;
  380. font-weight: bold !important;
  381. margin-bottom: 5px !important;
  382. color: #1e90ff !important;
  383. }
  384. p.script-description {
  385. color: black !important;
  386. margin-top: 2px;
  387. margin-bottom: 5px;
  388. font-size: 16px;
  389. }
  390. div.details-container {
  391. font-size: 15px;
  392. font-weight: bold;
  393. display: flex;
  394. justify-content: space-between;
  395. margin-bottom: 15px;
  396. }
  397. span.script-details {
  398. font: !important;
  399. color: black !important;
  400. flex-grow: 1 !important;
  401. text-align: center !important;
  402. border: 1px solid #1e90ff !important;
  403. border-radius: 5px !important;
  404. margin: 4px !important;
  405. }
  406. div.table-header {
  407. color: #1e90ff !important;
  408. font-size: 25px;
  409. font-weight: bold;
  410. }
  411. input.script-search-input {
  412. width: 96% !important;
  413. padding: 10px !important;
  414. font-size: 18px !important;
  415. border: 1px solid #1e90ff !important;
  416. border-radius: 4px !important;
  417. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
  418. margin-bottom: 15px !important;
  419. margin-top: 20px !important;
  420. }
  421. a.install-button {
  422. font-size: 20px;
  423. background-color: green;
  424. color: white;
  425. padding: 12px;
  426. }
  427. button.to-greasyfork {
  428. position: absolute;
  429. top: 12px;
  430. right: 12px;
  431. border-radius: 4px;
  432. padding: 8px;
  433. font-size: 16px;
  434. border: none;
  435. background-color: #1e90ff;
  436. color: #ffffff;
  437. cursor: pointer;
  438. }
  439. span.match-count {
  440. background-color: #1e90ff;
  441. font-size: 25px;
  442. font-weight: bold;
  443. color: white;
  444. padding: 6px;
  445. position: absolute;
  446. right: 50%;
  447. border-radius: 12px;
  448. top: 10px;
  449. }
  450. div.wait-loading {
  451. font-size: 20px;
  452. font-weight: bold;
  453. color: #1e90ff;
  454. animation: blink 1s infinite;
  455. }
  456. @keyframes fadeInOut {
  457. 0% {
  458. opacity: 0;
  459. }
  460. 50% {
  461. opacity: 1;
  462. }
  463. 100% {
  464. opacity: 0;
  465. }
  466. }
  467. @keyframes blink {
  468. 0%, 100% {
  469. opacity: 0;
  470. }
  471. 50% {
  472. opacity: 1;
  473. }
  474. }
  475. button.load-more {
  476. border-radius: 4px;
  477. padding: 8px;
  478. font-size: 16px;
  479. border: none;
  480. background-color: #1e90ff;
  481. color: #ffffff;
  482. cursor: pointer;
  483. position: relative;
  484. bottom: 5px;
  485. left: 50%;
  486. transform: translateX(-50%);
  487. }
  488. button.load-more:disabled {
  489. background-color: #cccccc;
  490. cursor: not-allowed;
  491. }
  492.  
  493. /* Mobile styles */
  494. @media (max-width: 600px) {
  495. scrbutton.script-button {
  496. right: -30px;
  497. padding: 8px;
  498. font-size: 14px;
  499. }
  500. span.script-details {
  501. font-size: 10px !important;
  502. margin: 2px !important;
  503. padding: 2px !important;
  504. }
  505. span.match-count {
  506. font-size: 20px;
  507. padding: 4px;
  508. }
  509.  
  510. button.to-greasyfork {
  511. padding: 6px;
  512. font-size: 14px;
  513. }
  514.  
  515. a.install-button {
  516. font-size: 12px;
  517. padding: 8px;
  518. }
  519. div.table-header {
  520. font-size: 20px;
  521. }
  522. div.script-container {
  523. padding: 10px;
  524. }
  525. div.info-container {
  526. top: 10%;
  527. left: 5%;
  528. right: 5%;
  529. transform: none;
  530. width: calc(90% - 10px); /* 自适应宽度,保持左右边距 */
  531. max-width: 100%; /* 确保不超出屏幕宽度 */
  532. }
  533. a.mscript-link {
  534. font-size: 16px !important;
  535. }
  536. p.script-description {
  537. font-size: 14px;
  538. }
  539. {
  540.  
  541. input.script-search-input {
  542. width: 92% !important;
  543. padding: 8px !important;
  544. font-size: 16px !important;
  545. }
  546. span.match-count {
  547. font-size: 20px;
  548. padding: 4px;
  549. }
  550. button.load-more {
  551. font-size: 14px;
  552. padding: 6px;
  553. }
  554. }
  555. `)
  556.  
  557.  
  558. // 创建打开列表按钮
  559. var button = document.createElement('scrbutton')
  560. button.className = 'script-button'
  561. button.innerText = translate('Scripts')
  562. document.addEventListener('fullscreenchange', function () {
  563. if (document.fullscreenElement) {
  564. button.style.display = 'none'
  565. } else {
  566. button.style.display = 'block'
  567. }
  568. })
  569. // 创建脚本容器
  570. var infoContainer = document.createElement('div')
  571. infoContainer.className = 'info-container'
  572.  
  573. // 创建搜索框
  574. var searchInput = document.createElement('input')
  575. searchInput.type = 'text'
  576. searchInput.placeholder = translate('SearchPlaceholder')
  577. searchInput.className = 'script-search-input'
  578.  
  579. // 创建指向greasyfork的链接
  580. var toGreasyfork = document.createElement('button')
  581. toGreasyfork.className = 'to-greasyfork'
  582. toGreasyfork.innerText = translate('ViewOnGreasyfork')
  583.  
  584. // 创建计数器
  585. var matchCount = document.createElement('span')
  586. matchCount.className = 'match-count'
  587.  
  588. // 创建表头
  589. var tableHeader = document.createElement('div')
  590. tableHeader.className = 'table-header'
  591. tableHeader.appendChild(document.createTextNode('Script Finder'))
  592. tableHeader.appendChild(matchCount)
  593. tableHeader.appendChild(searchInput)
  594. tableHeader.appendChild(toGreasyfork)
  595.  
  596. // 创建脚本列表
  597. var infoList = document.createElement('ul')
  598. infoList.className = 'info-list'
  599.  
  600. // 创建等待加载
  601. var waitLoading = document.createElement('div')
  602. waitLoading.className = 'wait-loading'
  603. waitLoading.innerText = translate('LoadingScripts')
  604.  
  605. // 创建加载更多
  606. var loadMore = document.createElement('button')
  607. loadMore.className = 'load-more'
  608. loadMore.innerText = 'Load more'
  609. loadMore.style.display = 'none'
  610.  
  611. infoList.appendChild(waitLoading)
  612. infoList.appendChild(loadMore)
  613.  
  614. infoContainer.appendChild(tableHeader)
  615. infoContainer.appendChild(infoList)
  616.  
  617. var timeout
  618. button.addEventListener('mouseenter', function () {
  619. clearTimeout(timeout)
  620. button.style.right = '10px'
  621. })
  622.  
  623. button.addEventListener('mouseleave', function () {
  624. timeout = setTimeout(function () {
  625. button.style.right = '-50px'
  626. }, 500)
  627. })
  628.  
  629. button.addEventListener('click', function (event) {
  630. event.stopPropagation()
  631. if (collapsed) {
  632. infoContainer.style.display = 'block'
  633. infoContainer.style.opacity = 1
  634. collapsed = false
  635. }
  636. else {
  637. infoContainer.style.display = 'none'
  638. infoContainer.style.opacity = 0
  639. collapsed = true
  640. }
  641.  
  642. if (neverLoadedScripts) {
  643. getScriptsInfo(domain, 1)
  644. neverLoadedScripts = false
  645. }
  646.  
  647. })
  648.  
  649. infoContainer.addEventListener('click', function (event) {
  650. event.stopPropagation()
  651. })
  652.  
  653. searchInput.addEventListener('input', () => {
  654. searchScript()
  655. updateMatches()
  656. })
  657.  
  658. toGreasyfork.addEventListener('click', function () {
  659. window.open(`https://greasyfork.org/scripts/by-site/${domain}?q=${searchInput.value}&filter_locale=0&sort=updated`)
  660. })
  661.  
  662. loadMore.addEventListener('click', () => {
  663. if (loadedPages === 'max') {
  664. return
  665. }
  666. const loadMoreButton = document.querySelector('.load-more')
  667. loadMoreButton.disabled = true
  668. loadMoreButton.textContent = translate('Loading')
  669. document.querySelector('.wait-loading').style.display = 'block'
  670. getScriptsInfo(domain, loadedPages + 1)
  671. })
  672.  
  673. document.body.addEventListener('click', function () {
  674. clearTimeout(timeout)
  675. collapsed = true
  676. button.style.right = '-50px'
  677. infoContainer.style.opacity = 0
  678. infoContainer.style.display = 'none'
  679. })
  680.  
  681. document.body.appendChild(button)
  682.  
  683. document.body.appendChild(infoContainer)
  684.  
  685. infoContainer.addEventListener('change', () => {
  686. updateMatches()
  687. })
  688. updateMatches()
  689. }
  690.  
  691. function searchScript() {
  692. const searchWord = document.querySelector('.script-search-input').value.toLowerCase() // 将要匹配的文本转换为小写
  693. const scriptList = document.querySelectorAll('.info-item')
  694. for (let i = 0; i < scriptList.length; i++) {
  695. const scriptText = scriptList[i].innerText.toLowerCase() // 将检索的文本转换为小写
  696. if (scriptText.includes(searchWord)) {
  697. scriptList[i].style.display = 'block'
  698. } else {
  699. scriptList[i].style.display = 'none'
  700. }
  701. }
  702. }
  703.  
  704. function updateMatches() {
  705. const matchCount = document.querySelectorAll('.info-item:not([style*="display: none"])').length
  706. const allCount = document.querySelectorAll('.info-item').length
  707. document.querySelector('.match-count').innerText = matchCount === allCount ? matchCount : `${matchCount}/${allCount}`
  708. }
  709.  
  710. function main() {
  711. if (window.self !== window.top) {
  712. // 在iframe中执行时,直接退出
  713. return
  714. }
  715. setupUI()
  716. }
  717.  
  718. main()
  719.  
  720.  
  721. })()