您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically extract the domain name from an input URL.
当前为
- // ==UserScript==
- // @name Greasy Fork by-site-searching URL autoextract
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Automatically extract the domain name from an input URL.
- // @author shiquda
- // @match https://greasyfork.org/*/scripts/by-site
- // @grant none
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- var tab = document.querySelector("body > div.width-constraint > section > form > input[type=search]:nth-child(2)")
- tab.addEventListener("input",change)
- function change(){
- var text = tab.value
- var change = text.match(/^https?:\/\/(?:www\.)?([^/?#]+)/i)[1]
- tab.value = change
- }
- // Your code here...
- })();