Use Vue.js in a TamperMonkey Script
Vue.js makes handling dynamic content easy in a TamperMonkey script.
Include the script⌗
Configure the script to include the Vue.js bundle from a CDN.
// @require https://cdn.jsdelivr.net/npm/vue
Initialize a Vue.js App⌗
It is recommended to initialize the Vue.js app after the page is ready.
window.addEventListener("load", (event) => {
// initialize app
const app = new Vue({
el: '#main-content',
data: {}
methods: {},
template: ``
})
})
Read other posts
Discuss Post