油猴 tamperMonkey 在百度首页 添加自己的自定义链接
2024-10-18 22:31:40
发现 GM_addStyle 函数不能用了,从写加载css函数。 剩下找个定位 添加内容 就很简单了。
// ==UserScript==
// @name helloWorld
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.baidu.com/
// @grant none
// @require http://code.jquery.com/jquery-1.11.0.min.js
// ==/UserScript== $(document).ready(function(){
// 在这里写你的代码... // console.info('form',$("form"))
let m = `<div style="color:#fff;position: absolute;bottom: -30px;">
<a class="myLink" href="http://www.baidu.com/" target="_blank">aaa</a>
</div>`
$(m).appendTo("#s_form_wrapper") }); (function() {
'use strict';
// Your code here...
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
} addGlobalStyle('a.myLink, a.myLink:hover { color:#fff; }'); })();
最新文章
- 顶点缓存对象(VBO)
- 我的ORM之二--添加
- UML - 类图
- SQL批量更新数据库中所有用户数据表中字段类型为tinyint为int
- 配置fabric-crashlytics教程
- php调试工具总结
- (转)Libevent(5)— 连接监听器
- stl binary search
- java菜鸟篇<;一>; 对JsonObject 和JsonArray知识点理解
- 主函数特别之处:public static void main(String[] args)
- 关于用wubi安装Ubuntu,总是提示“没有定义根文件系统”的问题
- 電腦清理緩存bat文件源碼
- widnow 下配置php开发环境
- Y7000安装驱动显卡问题
- 使用Mybatis-Generator自动生成Dao、Model、Mapping
- python一个简单的打包例子
- php 图片添加水印和二维码
- java struts2入门学习--OGNL语言常用符号和常用标签学习
- HBase 安装设置
- 360全景技术支持中心(KRPanoGUI三维全景制作软件)