Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivanzk/bookmarklet-webpack-template
Create bookmarklets using Webpack
https://github.com/ivanzk/bookmarklet-webpack-template
Last synced: 2 days ago
JSON representation
Create bookmarklets using Webpack
- Host: GitHub
- URL: https://github.com/ivanzk/bookmarklet-webpack-template
- Owner: ivanzk
- Created: 2020-08-31T17:13:49.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-03T21:45:35.000Z (about 4 years ago)
- Last Synced: 2024-08-02T13:32:57.240Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 88.9 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bookmarklet Webpack Template
Create bookmarklets using Webpack.
## Usage
### Installation
1. Clone the repo
2. Install dependencies: `npm install`### Development (with dev-server)
`npm start`
Make a new bookmark in your browser and paste the code below into the "URL" field
```js
javascript: (function () {
const script = document.createElement('script');
script.src = 'http://127.0.0.1:3010/bookmarklet.js';
document.body.appendChild(script);
})();
```If you get the error "Refused to load the script '127.0.0.1:3010/bookmarklet.js' because it violates the following Content Security Policy directive..." you can use extension [Disable Content-Security-Policy](https://chrome.google.com/webstore/detail/disable-content-security/ieelmcmcagommplceebfedjlakkhpden) to temporarily disable Content-Security-Policy during development.
### Development (without dev-server)
`npm run dev`
Use the code from './build/bookmarklet.js'
### Production
`npm run build`
Use the code from './dist/my-bookmarklet-name.js'