Skip to content

Instantly share code, notes, and snippets.

@abearxiong
Last active May 3, 2019 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abearxiong/db09cb10b2876fcbe32e2cf215316933 to your computer and use it in GitHub Desktop.
Save abearxiong/db09cb10b2876fcbe32e2cf215316933 to your computer and use it in GitHub Desktop.
tampermonkey 学习笔记

tampermonkey 本地引用js文件

Prepare in advance

chrome://extensions 把tampermonkey的[运行访问网址]勾上

coding

tampermonkey

// ==UserScript==
// @name         demo
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to learn
// @author       abearxiong
// @match        https://*/*
// @grant        none
// @require      file://d:\local.js
// ==/UserScript==
(async()=>{
   console.log("es5")
   local()
 })()

local.js (path in D:\local.js)

var local = async()=>{
	console.log("localjs")
}

print

es5
localjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment