// ==UserScript== // @name InstaSynchP CSSLoader // @namespace InstaSynchP // @description Framework plugin to load and unload CSS urls // @version 1.0.6 // @author Zod- // @source https://github.com/Zod-/InstaSynchP-CSSLoader // @license MIT // @include *://instasync.com/r/* // @include *://*.instasync.com/r/* // @grant none // @run-at document-start // @require https://greasyfork.org/scripts/5647-instasynchp-library/code/code.js?version=37716 // @downloadURL https://update.greasyfork.icu/scripts/5718/InstaSynchP%20CSSLoader.user.js // @updateURL https://update.greasyfork.icu/scripts/5718/InstaSynchP%20CSSLoader.meta.js // ==/UserScript== function Style(opts) { 'use strict'; this.name = opts.name; this.url = opts.url; this.autoload = opts.autoload; this.id = opts.id || this.name; this.content = opts.content; this.urlSetting = '{0}-css-url'.format(this.name); this.contentSetting = '{0}-css-content'.format(this.name); if (this.autoload) { this.load(); } } Style.prototype.onLoad = function () { 'use strict'; var _this = this; _this.fillElement(); events.fire('CSSLoad[{0}]'.format(_this.id)); }; Style.prototype.unLoad = function () { 'use strict'; var _this = this; $('#{0}'.format(_this.id)).remove(); }; Style.prototype.createElement = function () { 'use strict'; var _this = this; $('head').append( $('