lj800827 大佬有话说 :
10块钱找人写个简单的油猴脚本,一个网站点击跳转到另网站
就是写个油猴脚本
某个网站的详情页设个跳转按钮或者【文字】,然后点击可以跳转到百度首页
应该是很简单,但是我是小白,真是不会啊
有大佬试试吗
网站地址我私信你
zdszf 大佬有话说 :
10元的事情应该可以google得到直接答案
liuyangge 大佬有话说 :
写个A标签放body里不就好了吗:lol:lol
论坛大师 大佬有话说 :
找我写啊,钱就免了https://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif
admin2 大佬有话说 :
补充:markdown等超链接
Waylon 大佬有话说 :
稍等,我去看看我之前写的,某站下载按钮
lj800827 大佬有话说 :
论坛大师 大佬有话说 : 2020-12-8 21:22
找我写啊,钱就免了
网址私信你了,就是这个网址,跳转到www.baidu.com
6个字【点击这里跳转】
6个字的位置在右上角处
https://pic.downk.cc/item/5fcf810b3ffa7d37b309a293.png
论坛大师 大佬有话说 :
lj800827 大佬有话说 : 2020-12-8 21:35
网址私信你了,就是这个网址,跳转到www.baidu.com
6个字【点击这里跳转】
6个字的位置在右上角处
XY problemhttps://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif
Waylon 大佬有话说 :
本帖最后由 Waylon 于 2020-12-8 22:34 编辑
502终于好了。。。
之前的代码找到了,也改好了
大小,颜色,位置,通过CSS调整
// ==UserScript==
// @name 跳转按钮:跳转百度首页
// @namespace https://www.hostloc.com/thread-780133-1-1.html
// @version 2020-12-08
// @description跳转按钮:跳转百度首页
// @author HOSTLOC
// @match http*://typeyoursitehere/*
// @match https://www.hostloc.com/*
// @grant none
// ==/UserScript==
(function() {
function loadCssCode(code){
var ButtonStyle = document.createElement(‘style’);
ButtonStyle.type = ‘text/css’;
ButtonStyle.appendChild(document.createTextNode(code));
var head = document.getElementsByTagName(‘head’);
head.appendChild(ButtonStyle);
}
loadCssCode(‘.baidu{ background-color:#FFFFFF; border-color:#4CB0F9; color:#4CB0F9; }’);
loadCssCode(‘.baidu{ width:120px; height:30px; z-index:99; position:fixed; top:50px; right:50px;}’);
loadCssCode(‘.baidu{ box-shadow:2px 2px 1px #888888; border-radius:15px; font-weight:bold; transition-duration:0.8s;}’);
loadCssCode(‘.baidu:hover{ background-color:#1B9AF7; border-color:#4CB0F9; color:#FFFFFF; font-weight:bold; transition-duration:0.8s;}’);
var baiduButton = document.createElement("input");
baiduButton.type=’button’;
baiduButton.className="baidu";
baiduButton.name=’baidu’;
baiduButton.value="点击这里跳转";
baiduButton.onclick=function (){window.open("https://www.baidu.com/");};
document.body.append(baiduButton);
})();
lj800827 大佬有话说 :
Waylon 大佬有话说 : 2020-12-8 22:32
502终于好了。。。
之前的代码找到了,也改好了
大小,颜色,位置,通过CSS调整
多谢多谢我去试试