您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Discover Google Docs link in .gsheet file and navigate to it. 2020-03-02.
当前为
- // ==UserScript==
- // @name Load .gsheet link from local file
- // @version 0.1
- // @description Discover Google Docs link in .gsheet file and navigate to it. 2020-03-02.
- // @author Jefferson "jscher2000" Scher
- // @namespace JeffersonScher
- // @copyright Copyright 2020 Jefferson Scher
- // @license BSD-3-Clause
- // @match file:///*/*
- // @grant none
- // ==/UserScript==
- // Detect documents whose paths end with .gsheet
- if (location.pathname.indexOf('.gsheet') > -1 && location.pathname.slice(-7) == '.gsheet'){
- // Parse document text as JSON
- var oSheetInfo = JSON.parse(document.body.textContent);
- // Replace current page with linked page
- location.replace(oSheetInfo.url);
- }