Skip to content
This repository was archived by the owner on May 10, 2020. It is now read-only.

Development Snippets

Florian edited this page Jan 19, 2018 · 1 revision

Development Tapermonkey-Script

// ==UserScript==
// @name	p0weruser dev
// @namespace	Dev
// @author	Dev
// @description	Verbessert das pr0gramm mit einigen Erweiterungen
// @include	/^https?://pr0gramm.com/.*$/
// @connect     rep0st.rene8888.at
// @connect     github.com
// @connect     raw.githubusercontent.com
// @connect     pr0gramm.com
// @require     https://code.jquery.com/ui/1.12.1/jquery-ui.min.js
// @icon	https://pr0gramm.com/media/pr0gramm-favicon.png
// @version	1.6.0.6
// @grant	GM_notification
// @grant       GM_xmlhttpRequest
// @require     file:///D:/Projekte/p0weruser/dist/p0weruser.user.js
// ==/UserScript==
  1. Create a new userscript and paste the content above. Save after edit!
  2. Edit @require-location to match your local build-file.
  3. Allow tapermonkey to access local files, by enabling data-url-access in your browsers addon-settings
  4. Start your work

Module Skeletton

// Enable access to Utils-Class
import Utils from '../Utils';

// Basic Class-header
export default class ModuleName {
    // Executed on page-load
    constructor() {
        this.name = 'The Modules Name';
        this.description = 'Add description here'
    }
    // Executed if module gets loaded
    load() {
        this.styles = require('../style/StyleFile.less');
    }
}
  1. Add module-File in src/module Folder
  2. Add required style- and template-files
  3. Add module to getModules-method in P0weruser.js
  4. Enable module in settings (Browser)

Clone this wiki locally