npm init -y
Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.
| // ==UserScript== | |
| // @name HistoryLogger | |
| // @namespace 2yc.tw | |
| // @version 0.1 | |
| // @description Log all pushState and replaceState events in console | |
| // @author YY | |
| // @match *://*/* | |
| // @grant none | |
| // ==/UserScript== |
| import * as React from 'react' | |
| import { createPortal } from 'react-dom' | |
| type FrameProps = React.IframeHTMLAttributes<HTMLIFrameElement> & { | |
| head?: React.ComponentType<any> | |
| children?: React.ReactNode | |
| } | |
| const Frame = React.memo(({head, children, ...iframeProps}: FrameProps)=> { | |
| const node = React.useRef<HTMLIFrameElement>() | |
| const [doc, setDoc] = React.useState<Document>() |
| // ==UserScript== | |
| // @name RO_Seal_Auto.user.js | |
| // @namespace YY | |
| // @version 2.0 | |
| // @description RO Seal, auto get code | |
| // @author Y.Y. | |
| // @include /https:\/\/rom\.gnjoy\.com\.tw\/.*/ | |
| // @include /https://www.wegames.com.tw/site/login/ | |
| // @exclude https://rom.gnjoy.com.tw/fblike/getgift | |
| // @grant none |
| // ==UserScript== | |
| // @name pkget crawler | |
| // @namespace crawlPKGET | |
| // @version 2.1 | |
| // @description Pokemon is over there. | |
| // @author Y.Y. | |
| // @match https://pkget.com/* | |
| // @include https://pkget.com/* | |
| // @grant none | |
| // ==/UserScript== |
| window.NCNUCourseCrawler = (_ => { | |
| const recperpage = 600; | |
| const COURSE_NUM = 1376; | |
| const PAGES = Math.ceil(COURSE_NUM / recperpage); | |
| const YEAR = 1042; | |
| let courseList = []; | |
| function start() { | |
| _getCourseList(); | |
| courseList.forEach((val, i) => { |
A quick guide on how to setup Node.js development environment.
nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.