阅读:3076回复:2
有什么办法让油猴子脚本严格匹配网址
如下这个跳转脚本,虽然在baidu.com上面生效,但是和百度有关的所有网页都生效了。只要有baidu。com域名的都生效了。用什么办法仅仅让baidu。com一个网址生效呢。
// ==UserScript== // @name 跳转 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 跳转 // @author hunao.me // @match *.baidu.com/* // @grant none // @run-at document-start // ==/UserScript== (function() { 'use strict'; var temp_href = window.location.href; window.location.href="我跳转的网址"; })(); |
|
1楼#
发布于:2018-02-25 16:58
// @match baidu.com
|
|
2楼#
发布于:2018-02-25 09:54
// @match *.baidu.com/
|
|