10202 3 1 3
//@name 知乎直接看
//@match *

// m-script-end

// @run-at document-start
// @type bookmarklet
(function () {
  /* 判断是否该执行 */
  const whiteList = ['zhihu.com'];
  const hostname = window.location.hostname;
  const key = encodeURIComponent('谷花泰:知乎直接看:执行判断');

  const result = whiteList.some(site => {
    if (hostname.match(site)) {
      return true;
    }
    return false;
  });

  if (!result || window[key]) {
    return;
  };

  window[key] = true;

  /* 代码正文 */
  Object.defineProperties(window.navigator, {
    'userAgent': {
      enumerable: true,
      value: 'Mozilla/5.0 (Windows Phone 10)'
    },
    'appVersion': {
      enumerable: true,
      value: '5.0 (Windows Phone 10)'
    },
    'platform': {
      enumerable: true,
      value: 'Win32'
    }
  });
})();
最新回复 (3)
  • 0 引用
    复制导入不了,难道是要更新最新版?
    2021-4-21 只看Ta 收起回复
    luchao900: 不会自动导入的,先复制到粘贴板,软件中新建脚本,粘贴一下
    2021-4-21回复
  • 0 引用
    不管用,还是不能直接看
    2021-6-29 只看Ta 收起回复
    luchao900: 要改匹配域名 用*试试
    2021-6-29回复
  • 0 引用
    土狗用不了???
    10月前 只看Ta 回复
    • 轻创社区 - 有源软件体验中心
      5
        登录 注册
返回