Navigation

    小埋社区

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    怎么在Edge首页执行脚本啊...

    编程
    2
    3
    81
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Bruce
      Bruce ACG last edited by

      Edge最近学坏了,在首页加广告了,所以我想脚本去除
      用web api获取了首页的地址为https://ntp.msn.cn/edge/ntp
      我写的脚本是这样

      // ==UserScript==
      // @name         New Userscript
      // @namespace    http://tampermonkey.net/
      // @version      0.1
      // @description  try to take over the world!
      // @author       You
      // @match        https://www.tampermonkey.net/index.php?version=4.9&ext=iikm&updated=true
      // @grant        none
      // @match        https://ntp.msn.cn/edge/ntp
      // ==/UserScript==
      
      (function() {
          'use strict';
          document.getElementById("belowTheFold").style.visibility = "hidden";
          document.getElementById("c_chl").style.visibility = "hidden";
          document.getElementById("museumCard_titleText").style.visibility = "hidden";
          document.getElementsByClassName("legend_taglineWrapper-1")[0].style.visibility = "hidden";
      })();
      

      但是在首页不会自动加载脚本...

      PS:逐句执行之后可以去广告,效果如下
      image.png
      image.png

      1 Reply Last reply Reply Quote 0
      • Bruce
        Bruce ACG last edited by

        更新...不用脚本了,直接右上角设置,布局选自定义,下面的内容选择关闭,完事

        1 Reply Last reply Reply Quote 0
        • a-wing
          a-wing last edited by

          退微软保平安

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          © 2017-2021 小埋社区 All Rights Reserved | 皖ICP备17016228号-2