油猴js脚本-自动修改百度贴吧域名jump2.bdim为tieba.baidu
// ==UserScript==
// @name 自动修改百度贴吧域名jump2.bdim为tieba.baidu
// @namespace http://tampermonkey.net/
// @version 2024-11-12
// @description 自动修改百度贴吧域名jump2.bdim为tieba.baidu
// @author rkey
// @match https://jump2.bdimg.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bdimg.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
getUrl();
// Your code here...
})();
function getUrl(){
var url = window.location.href;
console.log("当前网址是:"+url); // 输出应该会类似这样:http://example.com/page.html
var newStr = url.replace("jump2.bdimg", "tieba.baidu");
console.log("当前修改后的网址是:"+newStr);
window.location.href = newStr;
}
版权声明:
作者:kukey-admin
链接:https://kuyour.top/?p=439
来源:KuKey
文章版权归作者所有,未经允许请勿转载。
![](https://kuyour.top/wp-content/uploads/2024/07/微信赞赏码.png)
![](https://kuyour.top/wp-content/uploads/2024/07/支付宝扫码领红包.png)
![](https://kuyour.top/wp-content/uploads/2023/04/wordpress-logo.png)
共有 0 条评论