在网页执行脚本

 

工具:

  1. 谷歌或EDGE浏览器
  2. 安装 tampermonkey 插件

步骤:

  1. 打开需要指定脚本的网站
  2. 点击tampermonkey 插件
  3. 选中新增脚本
  4. 开始编辑你的脚本

 

例如:

以 Java技术栈 为例,正常查看文章需要关注公众账号来解决查看全文,添加脚本后,无需关注公众号即可查看

 

 

复制代码
// ==UserScript==
// @name         Java技术栈
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        *://www.javastack.cn/article*
// @icon         https://www.google.com/s2/favicons?domain=javastack.cn
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // Your code here...
    document.getElementById("article-details").removeAttribute("style");
    document.getElementById("read-more").remove();
})();
复制代码

 

posted @   bookc  阅读(373)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 一文读懂知识蒸馏
· 终于写完轮子一部分:tcp代理 了,记录一下
点击右上角即可分享
微信分享提示