Skip to content

A boilerplate for larger sized userscripts. Encourages structure and maintainability by loading the actual script files on demand with RequireJS.

Notifications You must be signed in to change notification settings

JochemG/RequireJSUserScriptBoilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Quick start ###Setup

  1. Copy the contents of the userscript in the userscripts-folder to your new GreaseMonkey or TamperMonkey userscript.
  2. Open a terminal
  3. Do npm install
  4. Do npm start
  5. If server started correctly it should print 'Server running at http://127.0.0.1:8888'
    1. Is port 8888 in use, then change it to an available port in package.json and also modify the basePath-variable in the user script.
  6. Navigate to a http or https webpage that contains a div element. When the page is loaded it should alert "ui.js-file was loaded and says hello ;)" ###Modify
  7. Your target website might use dynamic loading, change the pageLoaded-function to deal with this.
  8. Start building your user script from public/main.js ;)

About

A boilerplate for larger sized userscripts. Encourages structure and maintainability by loading the actual script files on demand with RequireJS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published