diff --git a/.gitignore b/.gitignore index c713f5c..f5df669 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ pom.xml.asc /.nrepl-port .hgignore .hg/ -ext/js/generated/ .cljs_rhino_repl -profiles.clj -dist \ No newline at end of file +dist +ext +**/js/generated \ No newline at end of file diff --git a/Makefile b/Makefile index 388b67a..b28408c 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ dev : lein cljsbuild once - rm -rf ext/js/generated/out-* + mkdir -p ext + cp -R resources/shared/* resources/dev/* ext/ prod : lein with-profile prod cljsbuild once + mkdir -p ext + cp -R resources/shared/* resources/prod/* ext/ rm -rf ext/js/generated/out-* package : clean prod @@ -12,5 +15,7 @@ package : clean prod mv ext/looped-in.zip dist clean : - rm -rf ext/js/generated + rm -rf resources/dev/js/generated + rm -rf resources/prod/js/generated + rm -rf ext rm -rf dist diff --git a/project.clj b/project.clj index 31876c5..1ba7330 100644 --- a/project.clj +++ b/project.clj @@ -14,49 +14,57 @@ {:builds {:background {:source-paths ["src/background" "src/lib"] - :compiler {:output-dir "ext/js/generated/out-background" - :closure-output-charset "us-ascii" - :main looped-in.background - :output-to "ext/js/generated/background.js"}} + :compiler {:closure-output-charset "us-ascii" + :main looped-in.background}} :content {:source-paths ["src/content" "src/lib"] - :compiler {:output-dir "ext/js/generated/out-content" - :closure-output-charset "us-ascii" - :main looped-in.content - :output-to "ext/js/generated/content.js"}} + :compiler {:closure-output-charset "us-ascii" + :main looped-in.content}} :sidebar {:source-paths ["src/sidebar" "src/lib"] - :compiler {:output-dir "ext/js/generated/out-sidebar" - :closure-output-charset "us-ascii" - :main looped-in.sidebar - :output-to "ext/js/generated/sidebar.js"}}}}} + :compiler {:closure-output-charset "us-ascii" + :main looped-in.sidebar}}}}} :dev [:cljs-shared {:cljsbuild {:builds {:background - {:compiler {:optimizations :whitespace + {:compiler {:optimizations :none + :output-to "resources/dev/js/generated/background.js" + :output-dir "resources/dev/js/generated/out-background" + :asset-path "js/generated/out-background" :pretty-print true - :source-map "ext/js/generated/background.js.map"}} + :source-map true}} :content {:compiler {:optimizations :whitespace + :output-to "resources/dev/js/generated/content.js" + :output-dir "resources/dev/js/generated/out-content" :pretty-print true - :source-map "ext/js/generated/content.js.map"}} + :source-map "resources/dev/js/generated/content.js.map"}} :sidebar - {:compiler {:optimizations :whitespace + {:compiler {:optimizations :none + :output-to "resources/dev/js/generated/sidebar.js" + :output-dir "resources/dev/js/generated/out-sidebar" + :asset-path "js/generated/out-sidebar" :pretty-print true - :source-map "ext/js/generated/sidebar.js.map"}}}}}] + :source-map true}}}}}] :prod [:cljs-shared {:cljsbuild {:builds {:background {:compiler {:optimizations :simple + :output-to "resources/prod/js/generated/background.js" + :output-dir "resources/prod/js/generated/out-background" :pretty-print false :source-map false}} :content {:compiler {:optimizations :simple + :output-to "resources/prod/js/generated/content.js" + :output-dir "resources/prod/js/generated/out-content" :pretty-print false :source-map false}} :sidebar {:compiler {:optimizations :simple + :output-to "resources/prod/js/generated/sidebar.js" + :output-dir "resources/prod/js/generated/out-sidebar" :pretty-print false :source-map false}}}}}]}) diff --git a/resources/dev/background.html b/resources/dev/background.html new file mode 100644 index 0000000..876599a --- /dev/null +++ b/resources/dev/background.html @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/dev/js/browser-polyfill.js b/resources/dev/js/browser-polyfill.js new file mode 100644 index 0000000..7a4f9a2 --- /dev/null +++ b/resources/dev/js/browser-polyfill.js @@ -0,0 +1,903 @@ +(function (global, factory) { + if (typeof define === "function" && define.amd) { + define("webextension-polyfill", ["module"], factory); + } else if (typeof exports !== "undefined") { + factory(module); + } else { + var mod = { + exports: {} + }; + factory(mod); + global.browser = mod.exports; + } +})(this, function (module) { + /* webextension-polyfill - v0.2.1 - Mon Jan 08 2018 10:05:36 */ + /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ + /* vim: set sts=2 sw=2 et tw=80: */ + /* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + "use strict"; + + if (typeof browser === "undefined") { + // Wrapping the bulk of this polyfill in a one-time-use function is a minor + // optimization for Firefox. Since Spidermonkey does not fully parse the + // contents of a function until the first time it's called, and since it will + // never actually need to be called, this allows the polyfill to be included + // in Firefox nearly for free. + const wrapAPIs = () => { + // NOTE: apiMetadata is associated to the content of the api-metadata.json file + // at build time by replacing the following "include" with the content of the + // JSON file. + const apiMetadata = { + "alarms": { + "clear": { + "minArgs": 0, + "maxArgs": 1 + }, + "clearAll": { + "minArgs": 0, + "maxArgs": 0 + }, + "get": { + "minArgs": 0, + "maxArgs": 1 + }, + "getAll": { + "minArgs": 0, + "maxArgs": 0 + } + }, + "bookmarks": { + "create": { + "minArgs": 1, + "maxArgs": 1 + }, + "export": { + "minArgs": 0, + "maxArgs": 0 + }, + "get": { + "minArgs": 1, + "maxArgs": 1 + }, + "getChildren": { + "minArgs": 1, + "maxArgs": 1 + }, + "getRecent": { + "minArgs": 1, + "maxArgs": 1 + }, + "getTree": { + "minArgs": 0, + "maxArgs": 0 + }, + "getSubTree": { + "minArgs": 1, + "maxArgs": 1 + }, + "import": { + "minArgs": 0, + "maxArgs": 0 + }, + "move": { + "minArgs": 2, + "maxArgs": 2 + }, + "remove": { + "minArgs": 1, + "maxArgs": 1 + }, + "removeTree": { + "minArgs": 1, + "maxArgs": 1 + }, + "search": { + "minArgs": 1, + "maxArgs": 1 + }, + "update": { + "minArgs": 2, + "maxArgs": 2 + } + }, + "browserAction": { + "getBadgeBackgroundColor": { + "minArgs": 1, + "maxArgs": 1 + }, + "getBadgeText": { + "minArgs": 1, + "maxArgs": 1 + }, + "getPopup": { + "minArgs": 1, + "maxArgs": 1 + }, + "getTitle": { + "minArgs": 1, + "maxArgs": 1 + }, + "setIcon": { + "minArgs": 1, + "maxArgs": 1 + } + }, + "commands": { + "getAll": { + "minArgs": 0, + "maxArgs": 0 + } + }, + "contextMenus": { + "update": { + "minArgs": 2, + "maxArgs": 2 + }, + "remove": { + "minArgs": 1, + "maxArgs": 1 + }, + "removeAll": { + "minArgs": 0, + "maxArgs": 0 + } + }, + "cookies": { + "get": { + "minArgs": 1, + "maxArgs": 1 + }, + "getAll": { + "minArgs": 1, + "maxArgs": 1 + }, + "getAllCookieStores": { + "minArgs": 0, + "maxArgs": 0 + }, + "remove": { + "minArgs": 1, + "maxArgs": 1 + }, + "set": { + "minArgs": 1, + "maxArgs": 1 + } + }, + "devtools": { + "inspectedWindow": { + "eval": { + "minArgs": 1, + "maxArgs": 2 + } + }, + "panels": { + "create": { + "minArgs": 3, + "maxArgs": 3, + "singleCallbackArg": true + } + } + }, + "downloads": { + "download": { + "minArgs": 1, + "maxArgs": 1 + }, + "cancel": { + "minArgs": 1, + "maxArgs": 1 + }, + "erase": { + "minArgs": 1, + "maxArgs": 1 + }, + "getFileIcon": { + "minArgs": 1, + "maxArgs": 2 + }, + "open": { + "minArgs": 1, + "maxArgs": 1 + }, + "pause": { + "minArgs": 1, + "maxArgs": 1 + }, + "removeFile": { + "minArgs": 1, + "maxArgs": 1 + }, + "resume": { + "minArgs": 1, + "maxArgs": 1 + }, + "search": { + "minArgs": 1, + "maxArgs": 1 + }, + "show": { + "minArgs": 1, + "maxArgs": 1 + } + }, + "extension": { + "isAllowedFileSchemeAccess": { + "minArgs": 0, + "maxArgs": 0 + }, + "isAllowedIncognitoAccess": { + "minArgs": 0, + "maxArgs": 0 + } + }, + "history": { + "addUrl": { + "minArgs": 1, + "maxArgs": 1 + }, + "getVisits": { + "minArgs": 1, + "maxArgs": 1 + }, + "deleteAll": { + "minArgs": 0, + "maxArgs": 0 + }, + "deleteRange": { + "minArgs": 1, + "maxArgs": 1 + }, + "deleteUrl": { + "minArgs": 1, + "maxArgs": 1 + }, + "search": { + "minArgs": 1, + "maxArgs": 1 + } + }, + "i18n": { + "detectLanguage": { + "minArgs": 1, + "maxArgs": 1 + }, + "getAcceptLanguages": { + "minArgs": 0, + "maxArgs": 0 + } + }, + "idle": { + "queryState": { + "minArgs": 1, + "maxArgs": 1 + } + }, + "management": { + "get": { + "minArgs": 1, + "maxArgs": 1 + }, + "getAll": { + "minArgs": 0, + "maxArgs": 0 + }, + "getSelf": { + "minArgs": 0, + "maxArgs": 0 + }, + "uninstallSelf": { + "minArgs": 0, + "maxArgs": 1 + } + }, + "notifications": { + "clear": { + "minArgs": 1, + "maxArgs": 1 + }, + "create": { + "minArgs": 1, + "maxArgs": 2 + }, + "getAll": { + "minArgs": 0, + "maxArgs": 0 + }, + "getPermissionLevel": { + "minArgs": 0, + "maxArgs": 0 + }, + "update": { + "minArgs": 2, + "maxArgs": 2 + } + }, + "pageAction": { + "getPopup": { + "minArgs": 1, + "maxArgs": 1 + }, + "getTitle": { + "minArgs": 1, + "maxArgs": 1 + }, + "hide": { + "minArgs": 0, + "maxArgs": 0 + }, + "setIcon": { + "minArgs": 1, + "maxArgs": 1 + }, + "show": { + "minArgs": 0, + "maxArgs": 0 + } + }, + "runtime": { + "getBackgroundPage": { + "minArgs": 0, + "maxArgs": 0 + }, + "getBrowserInfo": { + "minArgs": 0, + "maxArgs": 0 + }, + "getPlatformInfo": { + "minArgs": 0, + "maxArgs": 0 + }, + "openOptionsPage": { + "minArgs": 0, + "maxArgs": 0 + }, + "requestUpdateCheck": { + "minArgs": 0, + "maxArgs": 0 + }, + "sendMessage": { + "minArgs": 1, + "maxArgs": 3 + }, + "sendNativeMessage": { + "minArgs": 2, + "maxArgs": 2 + }, + "setUninstallURL": { + "minArgs": 1, + "maxArgs": 1 + } + }, + "storage": { + "local": { + "clear": { + "minArgs": 0, + "maxArgs": 0 + }, + "get": { + "minArgs": 0, + "maxArgs": 1 + }, + "getBytesInUse": { + "minArgs": 0, + "maxArgs": 1 + }, + "remove": { + "minArgs": 1, + "maxArgs": 1 + }, + "set": { + "minArgs": 1, + "maxArgs": 1 + } + }, + "managed": { + "get": { + "minArgs": 0, + "maxArgs": 1 + }, + "getBytesInUse": { + "minArgs": 0, + "maxArgs": 1 + } + }, + "sync": { + "clear": { + "minArgs": 0, + "maxArgs": 0 + }, + "get": { + "minArgs": 0, + "maxArgs": 1 + }, + "getBytesInUse": { + "minArgs": 0, + "maxArgs": 1 + }, + "remove": { + "minArgs": 1, + "maxArgs": 1 + }, + "set": { + "minArgs": 1, + "maxArgs": 1 + } + } + }, + "tabs": { + "create": { + "minArgs": 1, + "maxArgs": 1 + }, + "captureVisibleTab": { + "minArgs": 0, + "maxArgs": 2 + }, + "detectLanguage": { + "minArgs": 0, + "maxArgs": 1 + }, + "duplicate": { + "minArgs": 1, + "maxArgs": 1 + }, + "executeScript": { + "minArgs": 1, + "maxArgs": 2 + }, + "get": { + "minArgs": 1, + "maxArgs": 1 + }, + "getCurrent": { + "minArgs": 0, + "maxArgs": 0 + }, + "getZoom": { + "minArgs": 0, + "maxArgs": 1 + }, + "getZoomSettings": { + "minArgs": 0, + "maxArgs": 1 + }, + "highlight": { + "minArgs": 1, + "maxArgs": 1 + }, + "insertCSS": { + "minArgs": 1, + "maxArgs": 2 + }, + "move": { + "minArgs": 2, + "maxArgs": 2 + }, + "reload": { + "minArgs": 0, + "maxArgs": 2 + }, + "remove": { + "minArgs": 1, + "maxArgs": 1 + }, + "query": { + "minArgs": 1, + "maxArgs": 1 + }, + "removeCSS": { + "minArgs": 1, + "maxArgs": 2 + }, + "sendMessage": { + "minArgs": 2, + "maxArgs": 3 + }, + "setZoom": { + "minArgs": 1, + "maxArgs": 2 + }, + "setZoomSettings": { + "minArgs": 1, + "maxArgs": 2 + }, + "update": { + "minArgs": 1, + "maxArgs": 2 + } + }, + "webNavigation": { + "getAllFrames": { + "minArgs": 1, + "maxArgs": 1 + }, + "getFrame": { + "minArgs": 1, + "maxArgs": 1 + } + }, + "webRequest": { + "handlerBehaviorChanged": { + "minArgs": 0, + "maxArgs": 0 + } + }, + "windows": { + "create": { + "minArgs": 0, + "maxArgs": 1 + }, + "get": { + "minArgs": 1, + "maxArgs": 2 + }, + "getAll": { + "minArgs": 0, + "maxArgs": 1 + }, + "getCurrent": { + "minArgs": 0, + "maxArgs": 1 + }, + "getLastFocused": { + "minArgs": 0, + "maxArgs": 1 + }, + "remove": { + "minArgs": 1, + "maxArgs": 1 + }, + "update": { + "minArgs": 2, + "maxArgs": 2 + } + } + }; + + if (Object.keys(apiMetadata).length === 0) { + throw new Error("api-metadata.json has not been included in browser-polyfill"); + } + + /** + * A WeakMap subclass which creates and stores a value for any key which does + * not exist when accessed, but behaves exactly as an ordinary WeakMap + * otherwise. + * + * @param {function} createItem + * A function which will be called in order to create the value for any + * key which does not exist, the first time it is accessed. The + * function receives, as its only argument, the key being created. + */ + class DefaultWeakMap extends WeakMap { + constructor(createItem, items = undefined) { + super(items); + this.createItem = createItem; + } + + get(key) { + if (!this.has(key)) { + this.set(key, this.createItem(key)); + } + + return super.get(key); + } + } + + /** + * Returns true if the given object is an object with a `then` method, and can + * therefore be assumed to behave as a Promise. + * + * @param {*} value The value to test. + * @returns {boolean} True if the value is thenable. + */ + const isThenable = value => { + return value && typeof value === "object" && typeof value.then === "function"; + }; + + /** + * Creates and returns a function which, when called, will resolve or reject + * the given promise based on how it is called: + * + * - If, when called, `chrome.runtime.lastError` contains a non-null object, + * the promise is rejected with that value. + * - If the function is called with exactly one argument, the promise is + * resolved to that value. + * - Otherwise, the promise is resolved to an array containing all of the + * function's arguments. + * + * @param {object} promise + * An object containing the resolution and rejection functions of a + * promise. + * @param {function} promise.resolve + * The promise's resolution function. + * @param {function} promise.rejection + * The promise's rejection function. + * @param {object} metadata + * Metadata about the wrapped method which has created the callback. + * @param {integer} metadata.maxResolvedArgs + * The maximum number of arguments which may be passed to the + * callback created by the wrapped async function. + * + * @returns {function} + * The generated callback function. + */ + const makeCallback = (promise, metadata) => { + return (...callbackArgs) => { + if (chrome.runtime.lastError) { + promise.reject(chrome.runtime.lastError); + } else if (metadata.singleCallbackArg || callbackArgs.length === 1) { + promise.resolve(callbackArgs[0]); + } else { + promise.resolve(callbackArgs); + } + }; + }; + + /** + * Creates a wrapper function for a method with the given name and metadata. + * + * @param {string} name + * The name of the method which is being wrapped. + * @param {object} metadata + * Metadata about the method being wrapped. + * @param {integer} metadata.minArgs + * The minimum number of arguments which must be passed to the + * function. If called with fewer than this number of arguments, the + * wrapper will raise an exception. + * @param {integer} metadata.maxArgs + * The maximum number of arguments which may be passed to the + * function. If called with more than this number of arguments, the + * wrapper will raise an exception. + * @param {integer} metadata.maxResolvedArgs + * The maximum number of arguments which may be passed to the + * callback created by the wrapped async function. + * + * @returns {function(object, ...*)} + * The generated wrapper function. + */ + const wrapAsyncFunction = (name, metadata) => { + const pluralizeArguments = numArgs => numArgs == 1 ? "argument" : "arguments"; + + return function asyncFunctionWrapper(target, ...args) { + if (args.length < metadata.minArgs) { + throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`); + } + + if (args.length > metadata.maxArgs) { + throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`); + } + + return new Promise((resolve, reject) => { + target[name](...args, makeCallback({ resolve, reject }, metadata)); + }); + }; + }; + + /** + * Wraps an existing method of the target object, so that calls to it are + * intercepted by the given wrapper function. The wrapper function receives, + * as its first argument, the original `target` object, followed by each of + * the arguments passed to the orginal method. + * + * @param {object} target + * The original target object that the wrapped method belongs to. + * @param {function} method + * The method being wrapped. This is used as the target of the Proxy + * object which is created to wrap the method. + * @param {function} wrapper + * The wrapper function which is called in place of a direct invocation + * of the wrapped method. + * + * @returns {Proxy} + * A Proxy object for the given method, which invokes the given wrapper + * method in its place. + */ + const wrapMethod = (target, method, wrapper) => { + return new Proxy(method, { + apply(targetMethod, thisObj, args) { + return wrapper.call(thisObj, target, ...args); + } + }); + }; + + let hasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty); + + /** + * Wraps an object in a Proxy which intercepts and wraps certain methods + * based on the given `wrappers` and `metadata` objects. + * + * @param {object} target + * The target object to wrap. + * + * @param {object} [wrappers = {}] + * An object tree containing wrapper functions for special cases. Any + * function present in this object tree is called in place of the + * method in the same location in the `target` object tree. These + * wrapper methods are invoked as described in {@see wrapMethod}. + * + * @param {object} [metadata = {}] + * An object tree containing metadata used to automatically generate + * Promise-based wrapper functions for asynchronous. Any function in + * the `target` object tree which has a corresponding metadata object + * in the same location in the `metadata` tree is replaced with an + * automatically-generated wrapper function, as described in + * {@see wrapAsyncFunction} + * + * @returns {Proxy} + */ + const wrapObject = (target, wrappers = {}, metadata = {}) => { + let cache = Object.create(null); + + let handlers = { + has(target, prop) { + return prop in target || prop in cache; + }, + + get(target, prop, receiver) { + if (prop in cache) { + return cache[prop]; + } + + if (!(prop in target)) { + return undefined; + } + + let value = target[prop]; + + if (typeof value === "function") { + // This is a method on the underlying object. Check if we need to do + // any wrapping. + + if (typeof wrappers[prop] === "function") { + // We have a special-case wrapper for this method. + value = wrapMethod(target, target[prop], wrappers[prop]); + } else if (hasOwnProperty(metadata, prop)) { + // This is an async method that we have metadata for. Create a + // Promise wrapper for it. + let wrapper = wrapAsyncFunction(prop, metadata[prop]); + value = wrapMethod(target, target[prop], wrapper); + } else { + // This is a method that we don't know or care about. Return the + // original method, bound to the underlying object. + value = value.bind(target); + } + } else if (typeof value === "object" && value !== null && (hasOwnProperty(wrappers, prop) || hasOwnProperty(metadata, prop))) { + // This is an object that we need to do some wrapping for the children + // of. Create a sub-object wrapper for it with the appropriate child + // metadata. + value = wrapObject(value, wrappers[prop], metadata[prop]); + } else { + // We don't need to do any wrapping for this property, + // so just forward all access to the underlying object. + Object.defineProperty(cache, prop, { + configurable: true, + enumerable: true, + get() { + return target[prop]; + }, + set(value) { + target[prop] = value; + } + }); + + return value; + } + + cache[prop] = value; + return value; + }, + + set(target, prop, value, receiver) { + if (prop in cache) { + cache[prop] = value; + } else { + target[prop] = value; + } + return true; + }, + + defineProperty(target, prop, desc) { + return Reflect.defineProperty(cache, prop, desc); + }, + + deleteProperty(target, prop) { + return Reflect.deleteProperty(cache, prop); + } + }; + + return new Proxy(target, handlers); + }; + + /** + * Creates a set of wrapper functions for an event object, which handles + * wrapping of listener functions that those messages are passed. + * + * A single wrapper is created for each listener function, and stored in a + * map. Subsequent calls to `addListener`, `hasListener`, or `removeListener` + * retrieve the original wrapper, so that attempts to remove a + * previously-added listener work as expected. + * + * @param {DefaultWeakMap} wrapperMap + * A DefaultWeakMap object which will create the appropriate wrapper + * for a given listener function when one does not exist, and retrieve + * an existing one when it does. + * + * @returns {object} + */ + const wrapEvent = wrapperMap => ({ + addListener(target, listener, ...args) { + target.addListener(wrapperMap.get(listener), ...args); + }, + + hasListener(target, listener) { + return target.hasListener(wrapperMap.get(listener)); + }, + + removeListener(target, listener) { + target.removeListener(wrapperMap.get(listener)); + } + }); + + const onMessageWrappers = new DefaultWeakMap(listener => { + if (typeof listener !== "function") { + return listener; + } + + /** + * Wraps a message listener function so that it may send responses based on + * its return value, rather than by returning a sentinel value and calling a + * callback. If the listener function returns a Promise, the response is + * sent when the promise either resolves or rejects. + * + * @param {*} message + * The message sent by the other end of the channel. + * @param {object} sender + * Details about the sender of the message. + * @param {function(*)} sendResponse + * A callback which, when called with an arbitrary argument, sends + * that value as a response. + * @returns {boolean} + * True if the wrapped listener returned a Promise, which will later + * yield a response. False otherwise. + */ + return function onMessage(message, sender, sendResponse) { + let result = listener(message, sender); + + if (isThenable(result)) { + result.then(sendResponse, error => { + console.error(error); + sendResponse(error); + }); + + return true; + } else if (result !== undefined) { + sendResponse(result); + } + }; + }); + + const staticWrappers = { + runtime: { + onMessage: wrapEvent(onMessageWrappers) + } + }; + + // Create a new empty object and copy the properties of the original chrome object + // to prevent a Proxy violation exception for the devtools API getter + // (which is a read-only non-configurable property on the original target). + const targetObject = Object.assign({}, chrome); + + return wrapObject(targetObject, staticWrappers, apiMetadata); + }; + + // The build process adds a UMD wrapper around this file, which makes the + // `module` variable available. + module.exports = wrapAPIs(); // eslint-disable-line no-undef + } else { + module.exports = browser; // eslint-disable-line no-undef + } +}); +//# sourceMappingURL=browser-polyfill.js.map diff --git a/resources/dev/js/browser-polyfill.js.map b/resources/dev/js/browser-polyfill.js.map new file mode 100644 index 0000000..5fba9d4 --- /dev/null +++ b/resources/dev/js/browser-polyfill.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["browser-polyfill.js"],"names":["browser","wrapAPIs","apiMetadata","Object","keys","length","Error","DefaultWeakMap","WeakMap","constructor","createItem","items","undefined","get","key","has","set","isThenable","value","then","makeCallback","promise","metadata","callbackArgs","chrome","runtime","lastError","reject","singleCallbackArg","resolve","wrapAsyncFunction","name","pluralizeArguments","numArgs","asyncFunctionWrapper","target","args","minArgs","maxArgs","Promise","wrapMethod","method","wrapper","Proxy","apply","targetMethod","thisObj","call","hasOwnProperty","Function","bind","prototype","wrapObject","wrappers","cache","create","handlers","prop","receiver","defineProperty","configurable","enumerable","desc","Reflect","deleteProperty","wrapEvent","wrapperMap","addListener","listener","hasListener","removeListener","onMessageWrappers","onMessage","message","sender","sendResponse","result","error","console","staticWrappers","targetObject","assign","module","exports"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;;;AAGA;;AAEA,MAAI,OAAOA,OAAP,KAAmB,WAAvB,EAAoC;AAClC;AACA;AACA;AACA;AACA;AACA,UAAMC,WAAW,MAAM;AACrB;AACA;AACA;AACA,YAAMC,cAAc;AAClB,kBAAU;AACR,mBAAS;AACP,uBAAW,CADJ;AAEP,uBAAW;AAFJ,WADD;AAKR,sBAAY;AACV,uBAAW,CADD;AAEV,uBAAW;AAFD,WALJ;AASR,iBAAO;AACL,uBAAW,CADN;AAEL,uBAAW;AAFN,WATC;AAaR,oBAAU;AACR,uBAAW,CADH;AAER,uBAAW;AAFH;AAbF,SADQ;AAmBlB,qBAAa;AACX,oBAAU;AACR,uBAAW,CADH;AAER,uBAAW;AAFH,WADC;AAKX,oBAAU;AACR,uBAAW,CADH;AAER,uBAAW;AAFH,WALC;AASX,iBAAO;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O,SAASI,SAAT,CAAmBC,OAAnB,EAA4BC,MAA5B,EAAoCC,YAApC,EAAkD;AACvD,cAAIC,SAASR,SAASK,OAAT,EAAkBC,MAAlB,CAAb;;AAEA,cAAIzD,WAAW2D,MAAX,CAAJ,EAAwB;AACtBA,mBAAOzD,IAAP,CAAYwD,YAAZ,EAA0BE,SAAS;AACjCC,sBAAQD,KAAR,CAAcA,KAAd;AACAF,2BAAaE,KAAb;AACD,aAHD;;AAKA,mBAAO,IAAP;AACD,WAPD,MAOO,IAAID,WAAWhE,SAAf,EAA0B;AAC/B+D,yBAAaC,MAAb;AACD;AACF,SAbD;AAcD,OApCyB,CAA1B;;AAsCA,YAAMG,iBAAiB;AACrBtD,iBAAS;AACP+C,qBAAWP,UAAUM,iBAAV;AADJ;AADY,OAAvB;;AAMA;AACA;AACA;AACA,YAAMS,eAAe7E,OAAO8E,MAAP,CAAc,EAAd,EAAkBzD,MAAlB,CAArB;;AAEA,aAAO4B,WAAW4B,YAAX,EAAyBD,cAAzB,EAAyC7E,WAAzC,CAAP;AACD,KAp2BD;;AAs2BA;AACA;AACAgF,WAAOC,OAAP,GAAiBlF,UAAjB,CA92BkC,CA82BL;AAC9B,GA/2BD,MA+2BO;AACLiF,WAAOC,OAAP,GAAiBnF,OAAjB,CADK,CACqB;AAC3B","file":"browser-polyfill.js","sourcesContent":["/* webextension-polyfill - v0.2.1 - Mon Jan 08 2018 10:05:36 */\n/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */\n/* vim: set sts=2 sw=2 et tw=80: */\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\"use strict\";\n\nif (typeof browser === \"undefined\") {\n // Wrapping the bulk of this polyfill in a one-time-use function is a minor\n // optimization for Firefox. Since Spidermonkey does not fully parse the\n // contents of a function until the first time it's called, and since it will\n // never actually need to be called, this allows the polyfill to be included\n // in Firefox nearly for free.\n const wrapAPIs = () => {\n // NOTE: apiMetadata is associated to the content of the api-metadata.json file\n // at build time by replacing the following \"include\" with the content of the\n // JSON file.\n const apiMetadata = {\n \"alarms\": {\n \"clear\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"clearAll\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"get\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"getAll\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n }\n },\n \"bookmarks\": {\n \"create\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"export\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"get\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getChildren\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getRecent\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getTree\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"getSubTree\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"import\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"move\": {\n \"minArgs\": 2,\n \"maxArgs\": 2\n },\n \"remove\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"removeTree\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"search\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"update\": {\n \"minArgs\": 2,\n \"maxArgs\": 2\n }\n },\n \"browserAction\": {\n \"getBadgeBackgroundColor\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getBadgeText\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getPopup\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getTitle\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"setIcon\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n },\n \"commands\": {\n \"getAll\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n }\n },\n \"contextMenus\": {\n \"update\": {\n \"minArgs\": 2,\n \"maxArgs\": 2\n },\n \"remove\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"removeAll\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n }\n },\n \"cookies\": {\n \"get\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getAll\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getAllCookieStores\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"remove\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"set\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n },\n \"devtools\": {\n \"inspectedWindow\": {\n \"eval\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n }\n },\n \"panels\": {\n \"create\": {\n \"minArgs\": 3,\n \"maxArgs\": 3,\n \"singleCallbackArg\": true\n }\n }\n },\n \"downloads\": {\n \"download\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"cancel\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"erase\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getFileIcon\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n },\n \"open\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"pause\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"removeFile\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"resume\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"search\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"show\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n },\n \"extension\": {\n \"isAllowedFileSchemeAccess\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"isAllowedIncognitoAccess\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n }\n },\n \"history\": {\n \"addUrl\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getVisits\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"deleteAll\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"deleteRange\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"deleteUrl\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"search\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n },\n \"i18n\": {\n \"detectLanguage\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getAcceptLanguages\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n }\n },\n \"idle\": {\n \"queryState\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n },\n \"management\": {\n \"get\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getAll\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"getSelf\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"uninstallSelf\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n }\n },\n \"notifications\": {\n \"clear\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"create\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n },\n \"getAll\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"getPermissionLevel\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"update\": {\n \"minArgs\": 2,\n \"maxArgs\": 2\n }\n },\n \"pageAction\": {\n \"getPopup\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getTitle\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"hide\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"setIcon\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"show\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n }\n },\n \"runtime\": {\n \"getBackgroundPage\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"getBrowserInfo\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"getPlatformInfo\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"openOptionsPage\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"requestUpdateCheck\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"sendMessage\": {\n \"minArgs\": 1,\n \"maxArgs\": 3\n },\n \"sendNativeMessage\": {\n \"minArgs\": 2,\n \"maxArgs\": 2\n },\n \"setUninstallURL\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n },\n \"storage\": {\n \"local\": {\n \"clear\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"get\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"getBytesInUse\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"remove\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"set\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n },\n \"managed\": {\n \"get\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"getBytesInUse\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n }\n },\n \"sync\": {\n \"clear\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"get\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"getBytesInUse\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"remove\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"set\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n }\n },\n \"tabs\": {\n \"create\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"captureVisibleTab\": {\n \"minArgs\": 0,\n \"maxArgs\": 2\n },\n \"detectLanguage\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"duplicate\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"executeScript\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n },\n \"get\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getCurrent\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n },\n \"getZoom\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"getZoomSettings\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"highlight\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"insertCSS\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n },\n \"move\": {\n \"minArgs\": 2,\n \"maxArgs\": 2\n },\n \"reload\": {\n \"minArgs\": 0,\n \"maxArgs\": 2\n },\n \"remove\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"query\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"removeCSS\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n },\n \"sendMessage\": {\n \"minArgs\": 2,\n \"maxArgs\": 3\n },\n \"setZoom\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n },\n \"setZoomSettings\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n },\n \"update\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n }\n },\n \"webNavigation\": {\n \"getAllFrames\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"getFrame\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n }\n },\n \"webRequest\": {\n \"handlerBehaviorChanged\": {\n \"minArgs\": 0,\n \"maxArgs\": 0\n }\n },\n \"windows\": {\n \"create\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"get\": {\n \"minArgs\": 1,\n \"maxArgs\": 2\n },\n \"getAll\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"getCurrent\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"getLastFocused\": {\n \"minArgs\": 0,\n \"maxArgs\": 1\n },\n \"remove\": {\n \"minArgs\": 1,\n \"maxArgs\": 1\n },\n \"update\": {\n \"minArgs\": 2,\n \"maxArgs\": 2\n }\n }\n };\n\n if (Object.keys(apiMetadata).length === 0) {\n throw new Error(\"api-metadata.json has not been included in browser-polyfill\");\n }\n\n /**\n * A WeakMap subclass which creates and stores a value for any key which does\n * not exist when accessed, but behaves exactly as an ordinary WeakMap\n * otherwise.\n *\n * @param {function} createItem\n * A function which will be called in order to create the value for any\n * key which does not exist, the first time it is accessed. The\n * function receives, as its only argument, the key being created.\n */\n class DefaultWeakMap extends WeakMap {\n constructor(createItem, items = undefined) {\n super(items);\n this.createItem = createItem;\n }\n\n get(key) {\n if (!this.has(key)) {\n this.set(key, this.createItem(key));\n }\n\n return super.get(key);\n }\n }\n\n /**\n * Returns true if the given object is an object with a `then` method, and can\n * therefore be assumed to behave as a Promise.\n *\n * @param {*} value The value to test.\n * @returns {boolean} True if the value is thenable.\n */\n const isThenable = value => {\n return value && typeof value === \"object\" && typeof value.then === \"function\";\n };\n\n /**\n * Creates and returns a function which, when called, will resolve or reject\n * the given promise based on how it is called:\n *\n * - If, when called, `chrome.runtime.lastError` contains a non-null object,\n * the promise is rejected with that value.\n * - If the function is called with exactly one argument, the promise is\n * resolved to that value.\n * - Otherwise, the promise is resolved to an array containing all of the\n * function's arguments.\n *\n * @param {object} promise\n * An object containing the resolution and rejection functions of a\n * promise.\n * @param {function} promise.resolve\n * The promise's resolution function.\n * @param {function} promise.rejection\n * The promise's rejection function.\n * @param {object} metadata\n * Metadata about the wrapped method which has created the callback.\n * @param {integer} metadata.maxResolvedArgs\n * The maximum number of arguments which may be passed to the\n * callback created by the wrapped async function.\n *\n * @returns {function}\n * The generated callback function.\n */\n const makeCallback = (promise, metadata) => {\n return (...callbackArgs) => {\n if (chrome.runtime.lastError) {\n promise.reject(chrome.runtime.lastError);\n } else if (metadata.singleCallbackArg || callbackArgs.length === 1) {\n promise.resolve(callbackArgs[0]);\n } else {\n promise.resolve(callbackArgs);\n }\n };\n };\n\n /**\n * Creates a wrapper function for a method with the given name and metadata.\n *\n * @param {string} name\n * The name of the method which is being wrapped.\n * @param {object} metadata\n * Metadata about the method being wrapped.\n * @param {integer} metadata.minArgs\n * The minimum number of arguments which must be passed to the\n * function. If called with fewer than this number of arguments, the\n * wrapper will raise an exception.\n * @param {integer} metadata.maxArgs\n * The maximum number of arguments which may be passed to the\n * function. If called with more than this number of arguments, the\n * wrapper will raise an exception.\n * @param {integer} metadata.maxResolvedArgs\n * The maximum number of arguments which may be passed to the\n * callback created by the wrapped async function.\n *\n * @returns {function(object, ...*)}\n * The generated wrapper function.\n */\n const wrapAsyncFunction = (name, metadata) => {\n const pluralizeArguments = (numArgs) => numArgs == 1 ? \"argument\" : \"arguments\";\n\n return function asyncFunctionWrapper(target, ...args) {\n if (args.length < metadata.minArgs) {\n throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);\n }\n\n if (args.length > metadata.maxArgs) {\n throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);\n }\n\n return new Promise((resolve, reject) => {\n target[name](...args, makeCallback({resolve, reject}, metadata));\n });\n };\n };\n\n /**\n * Wraps an existing method of the target object, so that calls to it are\n * intercepted by the given wrapper function. The wrapper function receives,\n * as its first argument, the original `target` object, followed by each of\n * the arguments passed to the orginal method.\n *\n * @param {object} target\n * The original target object that the wrapped method belongs to.\n * @param {function} method\n * The method being wrapped. This is used as the target of the Proxy\n * object which is created to wrap the method.\n * @param {function} wrapper\n * The wrapper function which is called in place of a direct invocation\n * of the wrapped method.\n *\n * @returns {Proxy}\n * A Proxy object for the given method, which invokes the given wrapper\n * method in its place.\n */\n const wrapMethod = (target, method, wrapper) => {\n return new Proxy(method, {\n apply(targetMethod, thisObj, args) {\n return wrapper.call(thisObj, target, ...args);\n },\n });\n };\n\n let hasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);\n\n /**\n * Wraps an object in a Proxy which intercepts and wraps certain methods\n * based on the given `wrappers` and `metadata` objects.\n *\n * @param {object} target\n * The target object to wrap.\n *\n * @param {object} [wrappers = {}]\n * An object tree containing wrapper functions for special cases. Any\n * function present in this object tree is called in place of the\n * method in the same location in the `target` object tree. These\n * wrapper methods are invoked as described in {@see wrapMethod}.\n *\n * @param {object} [metadata = {}]\n * An object tree containing metadata used to automatically generate\n * Promise-based wrapper functions for asynchronous. Any function in\n * the `target` object tree which has a corresponding metadata object\n * in the same location in the `metadata` tree is replaced with an\n * automatically-generated wrapper function, as described in\n * {@see wrapAsyncFunction}\n *\n * @returns {Proxy}\n */\n const wrapObject = (target, wrappers = {}, metadata = {}) => {\n let cache = Object.create(null);\n\n let handlers = {\n has(target, prop) {\n return prop in target || prop in cache;\n },\n\n get(target, prop, receiver) {\n if (prop in cache) {\n return cache[prop];\n }\n\n if (!(prop in target)) {\n return undefined;\n }\n\n let value = target[prop];\n\n if (typeof value === \"function\") {\n // This is a method on the underlying object. Check if we need to do\n // any wrapping.\n\n if (typeof wrappers[prop] === \"function\") {\n // We have a special-case wrapper for this method.\n value = wrapMethod(target, target[prop], wrappers[prop]);\n } else if (hasOwnProperty(metadata, prop)) {\n // This is an async method that we have metadata for. Create a\n // Promise wrapper for it.\n let wrapper = wrapAsyncFunction(prop, metadata[prop]);\n value = wrapMethod(target, target[prop], wrapper);\n } else {\n // This is a method that we don't know or care about. Return the\n // original method, bound to the underlying object.\n value = value.bind(target);\n }\n } else if (typeof value === \"object\" && value !== null &&\n (hasOwnProperty(wrappers, prop) ||\n hasOwnProperty(metadata, prop))) {\n // This is an object that we need to do some wrapping for the children\n // of. Create a sub-object wrapper for it with the appropriate child\n // metadata.\n value = wrapObject(value, wrappers[prop], metadata[prop]);\n } else {\n // We don't need to do any wrapping for this property,\n // so just forward all access to the underlying object.\n Object.defineProperty(cache, prop, {\n configurable: true,\n enumerable: true,\n get() {\n return target[prop];\n },\n set(value) {\n target[prop] = value;\n },\n });\n\n return value;\n }\n\n cache[prop] = value;\n return value;\n },\n\n set(target, prop, value, receiver) {\n if (prop in cache) {\n cache[prop] = value;\n } else {\n target[prop] = value;\n }\n return true;\n },\n\n defineProperty(target, prop, desc) {\n return Reflect.defineProperty(cache, prop, desc);\n },\n\n deleteProperty(target, prop) {\n return Reflect.deleteProperty(cache, prop);\n },\n };\n\n return new Proxy(target, handlers);\n };\n\n /**\n * Creates a set of wrapper functions for an event object, which handles\n * wrapping of listener functions that those messages are passed.\n *\n * A single wrapper is created for each listener function, and stored in a\n * map. Subsequent calls to `addListener`, `hasListener`, or `removeListener`\n * retrieve the original wrapper, so that attempts to remove a\n * previously-added listener work as expected.\n *\n * @param {DefaultWeakMap} wrapperMap\n * A DefaultWeakMap object which will create the appropriate wrapper\n * for a given listener function when one does not exist, and retrieve\n * an existing one when it does.\n *\n * @returns {object}\n */\n const wrapEvent = wrapperMap => ({\n addListener(target, listener, ...args) {\n target.addListener(wrapperMap.get(listener), ...args);\n },\n\n hasListener(target, listener) {\n return target.hasListener(wrapperMap.get(listener));\n },\n\n removeListener(target, listener) {\n target.removeListener(wrapperMap.get(listener));\n },\n });\n\n const onMessageWrappers = new DefaultWeakMap(listener => {\n if (typeof listener !== \"function\") {\n return listener;\n }\n\n /**\n * Wraps a message listener function so that it may send responses based on\n * its return value, rather than by returning a sentinel value and calling a\n * callback. If the listener function returns a Promise, the response is\n * sent when the promise either resolves or rejects.\n *\n * @param {*} message\n * The message sent by the other end of the channel.\n * @param {object} sender\n * Details about the sender of the message.\n * @param {function(*)} sendResponse\n * A callback which, when called with an arbitrary argument, sends\n * that value as a response.\n * @returns {boolean}\n * True if the wrapped listener returned a Promise, which will later\n * yield a response. False otherwise.\n */\n return function onMessage(message, sender, sendResponse) {\n let result = listener(message, sender);\n\n if (isThenable(result)) {\n result.then(sendResponse, error => {\n console.error(error);\n sendResponse(error);\n });\n\n return true;\n } else if (result !== undefined) {\n sendResponse(result);\n }\n };\n });\n\n const staticWrappers = {\n runtime: {\n onMessage: wrapEvent(onMessageWrappers),\n },\n };\n\n // Create a new empty object and copy the properties of the original chrome object\n // to prevent a Proxy violation exception for the devtools API getter\n // (which is a read-only non-configurable property on the original target).\n const targetObject = Object.assign({}, chrome);\n\n return wrapObject(targetObject, staticWrappers, apiMetadata);\n };\n\n // The build process adds a UMD wrapper around this file, which makes the\n // `module` variable available.\n module.exports = wrapAPIs(); // eslint-disable-line no-undef\n} else {\n module.exports = browser; // eslint-disable-line no-undef\n}\n"]} \ No newline at end of file diff --git a/resources/dev/manifest.json b/resources/dev/manifest.json new file mode 100644 index 0000000..2523a17 --- /dev/null +++ b/resources/dev/manifest.json @@ -0,0 +1,31 @@ +{ + "manifest_version": 2, + "name": "Looped In", + "version": "1.1.2", + "description": "Shows conversations on Hacker News about the current web page", + "icons": { + "16": "icons/icon16.png", + "48": "icons/icon48.png", + "96": "icons/icon96.png", + "128": "icons/icon128.png" + }, + "background": { + "page": "background.html" + }, + "browser_action": { + "default_icon": "icons/icon48.png", + "default_title": "Looped In" + }, + "content_scripts": [ + { + "matches": [""], + "js": [ + "js/browser-polyfill.js", + "js/generated/content.js" + ] + } + ], + "content_security_policy": "script-src 'self' 'unsafe-eval' 'sha256-CfMPE8ys/ylJ5D9qKG0a9/UejrcczMr4/EmFCbVbgcc=' 'sha256-XsBu2nEJnS7x/Izq1v7dzy3Ze5myJMHvg4zukh/R1Yk=' 'sha256-AUCho1UyOpYFSZDg8EM9SYlysRIrUpQKZ7iE9CFSYfU=' 'sha256-vLlTaRFN8A2FPadIx711FwK9Ytd6LXkAzuEYAdC0D1k='; object-src 'self'", + "permissions": ["tabs", "https://hn.algolia.com/*"], + "web_accessible_resources": ["sidebar.html", "js/*.map", "js/generated/*.map", "js/generated/out/*"] +} diff --git a/resources/dev/sidebar.html b/resources/dev/sidebar.html new file mode 100644 index 0000000..9aa2564 --- /dev/null +++ b/resources/dev/sidebar.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/ext/js/browser-polyfill.min.js b/resources/prod/js/browser-polyfill.min.js similarity index 100% rename from ext/js/browser-polyfill.min.js rename to resources/prod/js/browser-polyfill.min.js diff --git a/ext/manifest.json b/resources/prod/manifest.json similarity index 100% rename from ext/manifest.json rename to resources/prod/manifest.json diff --git a/ext/sidebar.html b/resources/prod/sidebar.html similarity index 100% rename from ext/sidebar.html rename to resources/prod/sidebar.html diff --git a/ext/css/sidebar.css b/resources/shared/css/sidebar.css similarity index 100% rename from ext/css/sidebar.css rename to resources/shared/css/sidebar.css diff --git a/ext/fonts/eot/FiraMono-Bold.eot b/resources/shared/fonts/eot/FiraMono-Bold.eot similarity index 100% rename from ext/fonts/eot/FiraMono-Bold.eot rename to resources/shared/fonts/eot/FiraMono-Bold.eot diff --git a/ext/fonts/eot/FiraMono-Medium.eot b/resources/shared/fonts/eot/FiraMono-Medium.eot similarity index 100% rename from ext/fonts/eot/FiraMono-Medium.eot rename to resources/shared/fonts/eot/FiraMono-Medium.eot diff --git a/ext/fonts/eot/FiraMono-Regular.eot b/resources/shared/fonts/eot/FiraMono-Regular.eot similarity index 100% rename from ext/fonts/eot/FiraMono-Regular.eot rename to resources/shared/fonts/eot/FiraMono-Regular.eot diff --git a/ext/fonts/eot/FiraSans-Bold.eot b/resources/shared/fonts/eot/FiraSans-Bold.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Bold.eot rename to resources/shared/fonts/eot/FiraSans-Bold.eot diff --git a/ext/fonts/eot/FiraSans-BoldItalic.eot b/resources/shared/fonts/eot/FiraSans-BoldItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-BoldItalic.eot rename to resources/shared/fonts/eot/FiraSans-BoldItalic.eot diff --git a/ext/fonts/eot/FiraSans-Book.eot b/resources/shared/fonts/eot/FiraSans-Book.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Book.eot rename to resources/shared/fonts/eot/FiraSans-Book.eot diff --git a/ext/fonts/eot/FiraSans-BookItalic.eot b/resources/shared/fonts/eot/FiraSans-BookItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-BookItalic.eot rename to resources/shared/fonts/eot/FiraSans-BookItalic.eot diff --git a/ext/fonts/eot/FiraSans-Eight.eot b/resources/shared/fonts/eot/FiraSans-Eight.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Eight.eot rename to resources/shared/fonts/eot/FiraSans-Eight.eot diff --git a/ext/fonts/eot/FiraSans-EightItalic.eot b/resources/shared/fonts/eot/FiraSans-EightItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-EightItalic.eot rename to resources/shared/fonts/eot/FiraSans-EightItalic.eot diff --git a/ext/fonts/eot/FiraSans-ExtraBold.eot b/resources/shared/fonts/eot/FiraSans-ExtraBold.eot similarity index 100% rename from ext/fonts/eot/FiraSans-ExtraBold.eot rename to resources/shared/fonts/eot/FiraSans-ExtraBold.eot diff --git a/ext/fonts/eot/FiraSans-ExtraBoldItalic.eot b/resources/shared/fonts/eot/FiraSans-ExtraBoldItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-ExtraBoldItalic.eot rename to resources/shared/fonts/eot/FiraSans-ExtraBoldItalic.eot diff --git a/ext/fonts/eot/FiraSans-ExtraLight.eot b/resources/shared/fonts/eot/FiraSans-ExtraLight.eot similarity index 100% rename from ext/fonts/eot/FiraSans-ExtraLight.eot rename to resources/shared/fonts/eot/FiraSans-ExtraLight.eot diff --git a/ext/fonts/eot/FiraSans-ExtraLightItalic.eot b/resources/shared/fonts/eot/FiraSans-ExtraLightItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-ExtraLightItalic.eot rename to resources/shared/fonts/eot/FiraSans-ExtraLightItalic.eot diff --git a/ext/fonts/eot/FiraSans-Four.eot b/resources/shared/fonts/eot/FiraSans-Four.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Four.eot rename to resources/shared/fonts/eot/FiraSans-Four.eot diff --git a/ext/fonts/eot/FiraSans-FourItalic.eot b/resources/shared/fonts/eot/FiraSans-FourItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-FourItalic.eot rename to resources/shared/fonts/eot/FiraSans-FourItalic.eot diff --git a/ext/fonts/eot/FiraSans-Hair.eot b/resources/shared/fonts/eot/FiraSans-Hair.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Hair.eot rename to resources/shared/fonts/eot/FiraSans-Hair.eot diff --git a/ext/fonts/eot/FiraSans-HairItalic.eot b/resources/shared/fonts/eot/FiraSans-HairItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-HairItalic.eot rename to resources/shared/fonts/eot/FiraSans-HairItalic.eot diff --git a/ext/fonts/eot/FiraSans-Heavy.eot b/resources/shared/fonts/eot/FiraSans-Heavy.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Heavy.eot rename to resources/shared/fonts/eot/FiraSans-Heavy.eot diff --git a/ext/fonts/eot/FiraSans-HeavyItalic.eot b/resources/shared/fonts/eot/FiraSans-HeavyItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-HeavyItalic.eot rename to resources/shared/fonts/eot/FiraSans-HeavyItalic.eot diff --git a/ext/fonts/eot/FiraSans-Italic.eot b/resources/shared/fonts/eot/FiraSans-Italic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Italic.eot rename to resources/shared/fonts/eot/FiraSans-Italic.eot diff --git a/ext/fonts/eot/FiraSans-Light.eot b/resources/shared/fonts/eot/FiraSans-Light.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Light.eot rename to resources/shared/fonts/eot/FiraSans-Light.eot diff --git a/ext/fonts/eot/FiraSans-LightItalic.eot b/resources/shared/fonts/eot/FiraSans-LightItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-LightItalic.eot rename to resources/shared/fonts/eot/FiraSans-LightItalic.eot diff --git a/ext/fonts/eot/FiraSans-Medium.eot b/resources/shared/fonts/eot/FiraSans-Medium.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Medium.eot rename to resources/shared/fonts/eot/FiraSans-Medium.eot diff --git a/ext/fonts/eot/FiraSans-MediumItalic.eot b/resources/shared/fonts/eot/FiraSans-MediumItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-MediumItalic.eot rename to resources/shared/fonts/eot/FiraSans-MediumItalic.eot diff --git a/ext/fonts/eot/FiraSans-Regular.eot b/resources/shared/fonts/eot/FiraSans-Regular.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Regular.eot rename to resources/shared/fonts/eot/FiraSans-Regular.eot diff --git a/ext/fonts/eot/FiraSans-SemiBold.eot b/resources/shared/fonts/eot/FiraSans-SemiBold.eot similarity index 100% rename from ext/fonts/eot/FiraSans-SemiBold.eot rename to resources/shared/fonts/eot/FiraSans-SemiBold.eot diff --git a/ext/fonts/eot/FiraSans-SemiBoldItalic.eot b/resources/shared/fonts/eot/FiraSans-SemiBoldItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-SemiBoldItalic.eot rename to resources/shared/fonts/eot/FiraSans-SemiBoldItalic.eot diff --git a/ext/fonts/eot/FiraSans-Thin.eot b/resources/shared/fonts/eot/FiraSans-Thin.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Thin.eot rename to resources/shared/fonts/eot/FiraSans-Thin.eot diff --git a/ext/fonts/eot/FiraSans-ThinItalic.eot b/resources/shared/fonts/eot/FiraSans-ThinItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-ThinItalic.eot rename to resources/shared/fonts/eot/FiraSans-ThinItalic.eot diff --git a/ext/fonts/eot/FiraSans-Two.eot b/resources/shared/fonts/eot/FiraSans-Two.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Two.eot rename to resources/shared/fonts/eot/FiraSans-Two.eot diff --git a/ext/fonts/eot/FiraSans-TwoItalic.eot b/resources/shared/fonts/eot/FiraSans-TwoItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-TwoItalic.eot rename to resources/shared/fonts/eot/FiraSans-TwoItalic.eot diff --git a/ext/fonts/eot/FiraSans-Ultra.eot b/resources/shared/fonts/eot/FiraSans-Ultra.eot similarity index 100% rename from ext/fonts/eot/FiraSans-Ultra.eot rename to resources/shared/fonts/eot/FiraSans-Ultra.eot diff --git a/ext/fonts/eot/FiraSans-UltraItalic.eot b/resources/shared/fonts/eot/FiraSans-UltraItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-UltraItalic.eot rename to resources/shared/fonts/eot/FiraSans-UltraItalic.eot diff --git a/ext/fonts/eot/FiraSans-UltraLight.eot b/resources/shared/fonts/eot/FiraSans-UltraLight.eot similarity index 100% rename from ext/fonts/eot/FiraSans-UltraLight.eot rename to resources/shared/fonts/eot/FiraSans-UltraLight.eot diff --git a/ext/fonts/eot/FiraSans-UltraLightItalic.eot b/resources/shared/fonts/eot/FiraSans-UltraLightItalic.eot similarity index 100% rename from ext/fonts/eot/FiraSans-UltraLightItalic.eot rename to resources/shared/fonts/eot/FiraSans-UltraLightItalic.eot diff --git a/ext/fonts/otf/FiraMono-Bold.otf b/resources/shared/fonts/otf/FiraMono-Bold.otf similarity index 100% rename from ext/fonts/otf/FiraMono-Bold.otf rename to resources/shared/fonts/otf/FiraMono-Bold.otf diff --git a/ext/fonts/otf/FiraMono-Medium.otf b/resources/shared/fonts/otf/FiraMono-Medium.otf similarity index 100% rename from ext/fonts/otf/FiraMono-Medium.otf rename to resources/shared/fonts/otf/FiraMono-Medium.otf diff --git a/ext/fonts/otf/FiraMono-Regular.otf b/resources/shared/fonts/otf/FiraMono-Regular.otf similarity index 100% rename from ext/fonts/otf/FiraMono-Regular.otf rename to resources/shared/fonts/otf/FiraMono-Regular.otf diff --git a/ext/fonts/otf/FiraSans-Bold.otf b/resources/shared/fonts/otf/FiraSans-Bold.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Bold.otf rename to resources/shared/fonts/otf/FiraSans-Bold.otf diff --git a/ext/fonts/otf/FiraSans-BoldItalic.otf b/resources/shared/fonts/otf/FiraSans-BoldItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-BoldItalic.otf rename to resources/shared/fonts/otf/FiraSans-BoldItalic.otf diff --git a/ext/fonts/otf/FiraSans-Book.otf b/resources/shared/fonts/otf/FiraSans-Book.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Book.otf rename to resources/shared/fonts/otf/FiraSans-Book.otf diff --git a/ext/fonts/otf/FiraSans-BookItalic.otf b/resources/shared/fonts/otf/FiraSans-BookItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-BookItalic.otf rename to resources/shared/fonts/otf/FiraSans-BookItalic.otf diff --git a/ext/fonts/otf/FiraSans-Eight.otf b/resources/shared/fonts/otf/FiraSans-Eight.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Eight.otf rename to resources/shared/fonts/otf/FiraSans-Eight.otf diff --git a/ext/fonts/otf/FiraSans-EightItalic.otf b/resources/shared/fonts/otf/FiraSans-EightItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-EightItalic.otf rename to resources/shared/fonts/otf/FiraSans-EightItalic.otf diff --git a/ext/fonts/otf/FiraSans-ExtraBold.otf b/resources/shared/fonts/otf/FiraSans-ExtraBold.otf similarity index 100% rename from ext/fonts/otf/FiraSans-ExtraBold.otf rename to resources/shared/fonts/otf/FiraSans-ExtraBold.otf diff --git a/ext/fonts/otf/FiraSans-ExtraBoldItalic.otf b/resources/shared/fonts/otf/FiraSans-ExtraBoldItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-ExtraBoldItalic.otf rename to resources/shared/fonts/otf/FiraSans-ExtraBoldItalic.otf diff --git a/ext/fonts/otf/FiraSans-ExtraLight.otf b/resources/shared/fonts/otf/FiraSans-ExtraLight.otf similarity index 100% rename from ext/fonts/otf/FiraSans-ExtraLight.otf rename to resources/shared/fonts/otf/FiraSans-ExtraLight.otf diff --git a/ext/fonts/otf/FiraSans-ExtraLightItalic.otf b/resources/shared/fonts/otf/FiraSans-ExtraLightItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-ExtraLightItalic.otf rename to resources/shared/fonts/otf/FiraSans-ExtraLightItalic.otf diff --git a/ext/fonts/otf/FiraSans-Four.otf b/resources/shared/fonts/otf/FiraSans-Four.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Four.otf rename to resources/shared/fonts/otf/FiraSans-Four.otf diff --git a/ext/fonts/otf/FiraSans-FourItalic.otf b/resources/shared/fonts/otf/FiraSans-FourItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-FourItalic.otf rename to resources/shared/fonts/otf/FiraSans-FourItalic.otf diff --git a/ext/fonts/otf/FiraSans-Hair.otf b/resources/shared/fonts/otf/FiraSans-Hair.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Hair.otf rename to resources/shared/fonts/otf/FiraSans-Hair.otf diff --git a/ext/fonts/otf/FiraSans-HairItalic.otf b/resources/shared/fonts/otf/FiraSans-HairItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-HairItalic.otf rename to resources/shared/fonts/otf/FiraSans-HairItalic.otf diff --git a/ext/fonts/otf/FiraSans-Heavy.otf b/resources/shared/fonts/otf/FiraSans-Heavy.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Heavy.otf rename to resources/shared/fonts/otf/FiraSans-Heavy.otf diff --git a/ext/fonts/otf/FiraSans-HeavyItalic.otf b/resources/shared/fonts/otf/FiraSans-HeavyItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-HeavyItalic.otf rename to resources/shared/fonts/otf/FiraSans-HeavyItalic.otf diff --git a/ext/fonts/otf/FiraSans-Italic.otf b/resources/shared/fonts/otf/FiraSans-Italic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Italic.otf rename to resources/shared/fonts/otf/FiraSans-Italic.otf diff --git a/ext/fonts/otf/FiraSans-Light.otf b/resources/shared/fonts/otf/FiraSans-Light.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Light.otf rename to resources/shared/fonts/otf/FiraSans-Light.otf diff --git a/ext/fonts/otf/FiraSans-LightItalic.otf b/resources/shared/fonts/otf/FiraSans-LightItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-LightItalic.otf rename to resources/shared/fonts/otf/FiraSans-LightItalic.otf diff --git a/ext/fonts/otf/FiraSans-Medium.otf b/resources/shared/fonts/otf/FiraSans-Medium.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Medium.otf rename to resources/shared/fonts/otf/FiraSans-Medium.otf diff --git a/ext/fonts/otf/FiraSans-MediumItalic.otf b/resources/shared/fonts/otf/FiraSans-MediumItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-MediumItalic.otf rename to resources/shared/fonts/otf/FiraSans-MediumItalic.otf diff --git a/ext/fonts/otf/FiraSans-Regular.otf b/resources/shared/fonts/otf/FiraSans-Regular.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Regular.otf rename to resources/shared/fonts/otf/FiraSans-Regular.otf diff --git a/ext/fonts/otf/FiraSans-SemiBold.otf b/resources/shared/fonts/otf/FiraSans-SemiBold.otf similarity index 100% rename from ext/fonts/otf/FiraSans-SemiBold.otf rename to resources/shared/fonts/otf/FiraSans-SemiBold.otf diff --git a/ext/fonts/otf/FiraSans-SemiBoldItalic.otf b/resources/shared/fonts/otf/FiraSans-SemiBoldItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-SemiBoldItalic.otf rename to resources/shared/fonts/otf/FiraSans-SemiBoldItalic.otf diff --git a/ext/fonts/otf/FiraSans-Thin.otf b/resources/shared/fonts/otf/FiraSans-Thin.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Thin.otf rename to resources/shared/fonts/otf/FiraSans-Thin.otf diff --git a/ext/fonts/otf/FiraSans-ThinItalic.otf b/resources/shared/fonts/otf/FiraSans-ThinItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-ThinItalic.otf rename to resources/shared/fonts/otf/FiraSans-ThinItalic.otf diff --git a/ext/fonts/otf/FiraSans-Two.otf b/resources/shared/fonts/otf/FiraSans-Two.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Two.otf rename to resources/shared/fonts/otf/FiraSans-Two.otf diff --git a/ext/fonts/otf/FiraSans-TwoItalic.otf b/resources/shared/fonts/otf/FiraSans-TwoItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-TwoItalic.otf rename to resources/shared/fonts/otf/FiraSans-TwoItalic.otf diff --git a/ext/fonts/otf/FiraSans-Ultra.otf b/resources/shared/fonts/otf/FiraSans-Ultra.otf similarity index 100% rename from ext/fonts/otf/FiraSans-Ultra.otf rename to resources/shared/fonts/otf/FiraSans-Ultra.otf diff --git a/ext/fonts/otf/FiraSans-UltraItalic.otf b/resources/shared/fonts/otf/FiraSans-UltraItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-UltraItalic.otf rename to resources/shared/fonts/otf/FiraSans-UltraItalic.otf diff --git a/ext/fonts/otf/FiraSans-UltraLight.otf b/resources/shared/fonts/otf/FiraSans-UltraLight.otf similarity index 100% rename from ext/fonts/otf/FiraSans-UltraLight.otf rename to resources/shared/fonts/otf/FiraSans-UltraLight.otf diff --git a/ext/fonts/otf/FiraSans-UltraLightItalic.otf b/resources/shared/fonts/otf/FiraSans-UltraLightItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSans-UltraLightItalic.otf rename to resources/shared/fonts/otf/FiraSans-UltraLightItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Bold.otf b/resources/shared/fonts/otf/FiraSansCondensed-Bold.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Bold.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Bold.otf diff --git a/ext/fonts/otf/FiraSansCondensed-BoldItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-BoldItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-BoldItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-BoldItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Book.otf b/resources/shared/fonts/otf/FiraSansCondensed-Book.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Book.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Book.otf diff --git a/ext/fonts/otf/FiraSansCondensed-BookItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-BookItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-BookItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-BookItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Eight.otf b/resources/shared/fonts/otf/FiraSansCondensed-Eight.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Eight.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Eight.otf diff --git a/ext/fonts/otf/FiraSansCondensed-EightItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-EightItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-EightItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-EightItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-ExtraBold.otf b/resources/shared/fonts/otf/FiraSansCondensed-ExtraBold.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-ExtraBold.otf rename to resources/shared/fonts/otf/FiraSansCondensed-ExtraBold.otf diff --git a/ext/fonts/otf/FiraSansCondensed-ExtraLight.otf b/resources/shared/fonts/otf/FiraSansCondensed-ExtraLight.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-ExtraLight.otf rename to resources/shared/fonts/otf/FiraSansCondensed-ExtraLight.otf diff --git a/ext/fonts/otf/FiraSansCondensed-ExtraLightItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-ExtraLightItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-ExtraLightItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-ExtraLightItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-ExtraboldItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-ExtraboldItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-ExtraboldItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-ExtraboldItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Four.otf b/resources/shared/fonts/otf/FiraSansCondensed-Four.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Four.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Four.otf diff --git a/ext/fonts/otf/FiraSansCondensed-FourItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-FourItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-FourItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-FourItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Hair.otf b/resources/shared/fonts/otf/FiraSansCondensed-Hair.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Hair.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Hair.otf diff --git a/ext/fonts/otf/FiraSansCondensed-HairItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-HairItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-HairItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-HairItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Heavy.otf b/resources/shared/fonts/otf/FiraSansCondensed-Heavy.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Heavy.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Heavy.otf diff --git a/ext/fonts/otf/FiraSansCondensed-HeavyItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-HeavyItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-HeavyItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-HeavyItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Italic.otf b/resources/shared/fonts/otf/FiraSansCondensed-Italic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Italic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Italic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Light.otf b/resources/shared/fonts/otf/FiraSansCondensed-Light.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Light.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Light.otf diff --git a/ext/fonts/otf/FiraSansCondensed-LightItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-LightItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-LightItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-LightItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Medium.otf b/resources/shared/fonts/otf/FiraSansCondensed-Medium.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Medium.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Medium.otf diff --git a/ext/fonts/otf/FiraSansCondensed-MediumItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-MediumItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-MediumItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-MediumItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Regular.otf b/resources/shared/fonts/otf/FiraSansCondensed-Regular.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Regular.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Regular.otf diff --git a/ext/fonts/otf/FiraSansCondensed-SemiBold.otf b/resources/shared/fonts/otf/FiraSansCondensed-SemiBold.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-SemiBold.otf rename to resources/shared/fonts/otf/FiraSansCondensed-SemiBold.otf diff --git a/ext/fonts/otf/FiraSansCondensed-SemiboldItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-SemiboldItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-SemiboldItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-SemiboldItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Thin.otf b/resources/shared/fonts/otf/FiraSansCondensed-Thin.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Thin.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Thin.otf diff --git a/ext/fonts/otf/FiraSansCondensed-ThinItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-ThinItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-ThinItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-ThinItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Two.otf b/resources/shared/fonts/otf/FiraSansCondensed-Two.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Two.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Two.otf diff --git a/ext/fonts/otf/FiraSansCondensed-TwoItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-TwoItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-TwoItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-TwoItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-Ultra.otf b/resources/shared/fonts/otf/FiraSansCondensed-Ultra.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-Ultra.otf rename to resources/shared/fonts/otf/FiraSansCondensed-Ultra.otf diff --git a/ext/fonts/otf/FiraSansCondensed-UltraItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-UltraItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-UltraItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-UltraItalic.otf diff --git a/ext/fonts/otf/FiraSansCondensed-UltraLight.otf b/resources/shared/fonts/otf/FiraSansCondensed-UltraLight.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-UltraLight.otf rename to resources/shared/fonts/otf/FiraSansCondensed-UltraLight.otf diff --git a/ext/fonts/otf/FiraSansCondensed-UltraLightItalic.otf b/resources/shared/fonts/otf/FiraSansCondensed-UltraLightItalic.otf similarity index 100% rename from ext/fonts/otf/FiraSansCondensed-UltraLightItalic.otf rename to resources/shared/fonts/otf/FiraSansCondensed-UltraLightItalic.otf diff --git a/ext/fonts/ttf/FiraMono-Bold.ttf b/resources/shared/fonts/ttf/FiraMono-Bold.ttf similarity index 100% rename from ext/fonts/ttf/FiraMono-Bold.ttf rename to resources/shared/fonts/ttf/FiraMono-Bold.ttf diff --git a/ext/fonts/ttf/FiraMono-Medium.ttf b/resources/shared/fonts/ttf/FiraMono-Medium.ttf similarity index 100% rename from ext/fonts/ttf/FiraMono-Medium.ttf rename to resources/shared/fonts/ttf/FiraMono-Medium.ttf diff --git a/ext/fonts/ttf/FiraMono-Regular.ttf b/resources/shared/fonts/ttf/FiraMono-Regular.ttf similarity index 100% rename from ext/fonts/ttf/FiraMono-Regular.ttf rename to resources/shared/fonts/ttf/FiraMono-Regular.ttf diff --git a/ext/fonts/ttf/FiraSans-Bold.ttf b/resources/shared/fonts/ttf/FiraSans-Bold.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Bold.ttf rename to resources/shared/fonts/ttf/FiraSans-Bold.ttf diff --git a/ext/fonts/ttf/FiraSans-BoldItalic.ttf b/resources/shared/fonts/ttf/FiraSans-BoldItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-BoldItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-BoldItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Book.ttf b/resources/shared/fonts/ttf/FiraSans-Book.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Book.ttf rename to resources/shared/fonts/ttf/FiraSans-Book.ttf diff --git a/ext/fonts/ttf/FiraSans-BookItalic.ttf b/resources/shared/fonts/ttf/FiraSans-BookItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-BookItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-BookItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Eight.ttf b/resources/shared/fonts/ttf/FiraSans-Eight.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Eight.ttf rename to resources/shared/fonts/ttf/FiraSans-Eight.ttf diff --git a/ext/fonts/ttf/FiraSans-EightItalic.ttf b/resources/shared/fonts/ttf/FiraSans-EightItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-EightItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-EightItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-ExtraBold.ttf b/resources/shared/fonts/ttf/FiraSans-ExtraBold.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-ExtraBold.ttf rename to resources/shared/fonts/ttf/FiraSans-ExtraBold.ttf diff --git a/ext/fonts/ttf/FiraSans-ExtraBoldItalic.ttf b/resources/shared/fonts/ttf/FiraSans-ExtraBoldItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-ExtraBoldItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-ExtraBoldItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-ExtraLight.ttf b/resources/shared/fonts/ttf/FiraSans-ExtraLight.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-ExtraLight.ttf rename to resources/shared/fonts/ttf/FiraSans-ExtraLight.ttf diff --git a/ext/fonts/ttf/FiraSans-ExtraLightItalic.ttf b/resources/shared/fonts/ttf/FiraSans-ExtraLightItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-ExtraLightItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-ExtraLightItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Four.ttf b/resources/shared/fonts/ttf/FiraSans-Four.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Four.ttf rename to resources/shared/fonts/ttf/FiraSans-Four.ttf diff --git a/ext/fonts/ttf/FiraSans-FourItalic.ttf b/resources/shared/fonts/ttf/FiraSans-FourItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-FourItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-FourItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Hair.ttf b/resources/shared/fonts/ttf/FiraSans-Hair.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Hair.ttf rename to resources/shared/fonts/ttf/FiraSans-Hair.ttf diff --git a/ext/fonts/ttf/FiraSans-HairItalic.ttf b/resources/shared/fonts/ttf/FiraSans-HairItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-HairItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-HairItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Heavy.ttf b/resources/shared/fonts/ttf/FiraSans-Heavy.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Heavy.ttf rename to resources/shared/fonts/ttf/FiraSans-Heavy.ttf diff --git a/ext/fonts/ttf/FiraSans-HeavyItalic.ttf b/resources/shared/fonts/ttf/FiraSans-HeavyItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-HeavyItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-HeavyItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Italic.ttf b/resources/shared/fonts/ttf/FiraSans-Italic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Italic.ttf rename to resources/shared/fonts/ttf/FiraSans-Italic.ttf diff --git a/ext/fonts/ttf/FiraSans-Light.ttf b/resources/shared/fonts/ttf/FiraSans-Light.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Light.ttf rename to resources/shared/fonts/ttf/FiraSans-Light.ttf diff --git a/ext/fonts/ttf/FiraSans-LightItalic.ttf b/resources/shared/fonts/ttf/FiraSans-LightItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-LightItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-LightItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Medium.ttf b/resources/shared/fonts/ttf/FiraSans-Medium.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Medium.ttf rename to resources/shared/fonts/ttf/FiraSans-Medium.ttf diff --git a/ext/fonts/ttf/FiraSans-MediumItalic.ttf b/resources/shared/fonts/ttf/FiraSans-MediumItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-MediumItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-MediumItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Regular.ttf b/resources/shared/fonts/ttf/FiraSans-Regular.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Regular.ttf rename to resources/shared/fonts/ttf/FiraSans-Regular.ttf diff --git a/ext/fonts/ttf/FiraSans-SemiBold.ttf b/resources/shared/fonts/ttf/FiraSans-SemiBold.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-SemiBold.ttf rename to resources/shared/fonts/ttf/FiraSans-SemiBold.ttf diff --git a/ext/fonts/ttf/FiraSans-SemiBoldItalic.ttf b/resources/shared/fonts/ttf/FiraSans-SemiBoldItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-SemiBoldItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-SemiBoldItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Thin.ttf b/resources/shared/fonts/ttf/FiraSans-Thin.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Thin.ttf rename to resources/shared/fonts/ttf/FiraSans-Thin.ttf diff --git a/ext/fonts/ttf/FiraSans-ThinItalic.ttf b/resources/shared/fonts/ttf/FiraSans-ThinItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-ThinItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-ThinItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Two.ttf b/resources/shared/fonts/ttf/FiraSans-Two.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Two.ttf rename to resources/shared/fonts/ttf/FiraSans-Two.ttf diff --git a/ext/fonts/ttf/FiraSans-TwoItalic.ttf b/resources/shared/fonts/ttf/FiraSans-TwoItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-TwoItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-TwoItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-Ultra.ttf b/resources/shared/fonts/ttf/FiraSans-Ultra.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-Ultra.ttf rename to resources/shared/fonts/ttf/FiraSans-Ultra.ttf diff --git a/ext/fonts/ttf/FiraSans-UltraItalic.ttf b/resources/shared/fonts/ttf/FiraSans-UltraItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-UltraItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-UltraItalic.ttf diff --git a/ext/fonts/ttf/FiraSans-UltraLight.ttf b/resources/shared/fonts/ttf/FiraSans-UltraLight.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-UltraLight.ttf rename to resources/shared/fonts/ttf/FiraSans-UltraLight.ttf diff --git a/ext/fonts/ttf/FiraSans-UltraLightItalic.ttf b/resources/shared/fonts/ttf/FiraSans-UltraLightItalic.ttf similarity index 100% rename from ext/fonts/ttf/FiraSans-UltraLightItalic.ttf rename to resources/shared/fonts/ttf/FiraSans-UltraLightItalic.ttf diff --git a/ext/fonts/woff/FiraMono-Bold.woff b/resources/shared/fonts/woff/FiraMono-Bold.woff similarity index 100% rename from ext/fonts/woff/FiraMono-Bold.woff rename to resources/shared/fonts/woff/FiraMono-Bold.woff diff --git a/ext/fonts/woff/FiraMono-Medium.woff b/resources/shared/fonts/woff/FiraMono-Medium.woff similarity index 100% rename from ext/fonts/woff/FiraMono-Medium.woff rename to resources/shared/fonts/woff/FiraMono-Medium.woff diff --git a/ext/fonts/woff/FiraMono-Regular.woff b/resources/shared/fonts/woff/FiraMono-Regular.woff similarity index 100% rename from ext/fonts/woff/FiraMono-Regular.woff rename to resources/shared/fonts/woff/FiraMono-Regular.woff diff --git a/ext/fonts/woff/FiraSans-Bold.woff b/resources/shared/fonts/woff/FiraSans-Bold.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Bold.woff rename to resources/shared/fonts/woff/FiraSans-Bold.woff diff --git a/ext/fonts/woff/FiraSans-BoldItalic.woff b/resources/shared/fonts/woff/FiraSans-BoldItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-BoldItalic.woff rename to resources/shared/fonts/woff/FiraSans-BoldItalic.woff diff --git a/ext/fonts/woff/FiraSans-Book.woff b/resources/shared/fonts/woff/FiraSans-Book.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Book.woff rename to resources/shared/fonts/woff/FiraSans-Book.woff diff --git a/ext/fonts/woff/FiraSans-BookItalic.woff b/resources/shared/fonts/woff/FiraSans-BookItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-BookItalic.woff rename to resources/shared/fonts/woff/FiraSans-BookItalic.woff diff --git a/ext/fonts/woff/FiraSans-Eight.woff b/resources/shared/fonts/woff/FiraSans-Eight.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Eight.woff rename to resources/shared/fonts/woff/FiraSans-Eight.woff diff --git a/ext/fonts/woff/FiraSans-EightItalic.woff b/resources/shared/fonts/woff/FiraSans-EightItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-EightItalic.woff rename to resources/shared/fonts/woff/FiraSans-EightItalic.woff diff --git a/ext/fonts/woff/FiraSans-ExtraBold.woff b/resources/shared/fonts/woff/FiraSans-ExtraBold.woff similarity index 100% rename from ext/fonts/woff/FiraSans-ExtraBold.woff rename to resources/shared/fonts/woff/FiraSans-ExtraBold.woff diff --git a/ext/fonts/woff/FiraSans-ExtraBoldItalic.woff b/resources/shared/fonts/woff/FiraSans-ExtraBoldItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-ExtraBoldItalic.woff rename to resources/shared/fonts/woff/FiraSans-ExtraBoldItalic.woff diff --git a/ext/fonts/woff/FiraSans-ExtraLight.woff b/resources/shared/fonts/woff/FiraSans-ExtraLight.woff similarity index 100% rename from ext/fonts/woff/FiraSans-ExtraLight.woff rename to resources/shared/fonts/woff/FiraSans-ExtraLight.woff diff --git a/ext/fonts/woff/FiraSans-ExtraLightItalic.woff b/resources/shared/fonts/woff/FiraSans-ExtraLightItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-ExtraLightItalic.woff rename to resources/shared/fonts/woff/FiraSans-ExtraLightItalic.woff diff --git a/ext/fonts/woff/FiraSans-Four.woff b/resources/shared/fonts/woff/FiraSans-Four.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Four.woff rename to resources/shared/fonts/woff/FiraSans-Four.woff diff --git a/ext/fonts/woff/FiraSans-FourItalic.woff b/resources/shared/fonts/woff/FiraSans-FourItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-FourItalic.woff rename to resources/shared/fonts/woff/FiraSans-FourItalic.woff diff --git a/ext/fonts/woff/FiraSans-Hair.woff b/resources/shared/fonts/woff/FiraSans-Hair.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Hair.woff rename to resources/shared/fonts/woff/FiraSans-Hair.woff diff --git a/ext/fonts/woff/FiraSans-HairItalic.woff b/resources/shared/fonts/woff/FiraSans-HairItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-HairItalic.woff rename to resources/shared/fonts/woff/FiraSans-HairItalic.woff diff --git a/ext/fonts/woff/FiraSans-Heavy.woff b/resources/shared/fonts/woff/FiraSans-Heavy.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Heavy.woff rename to resources/shared/fonts/woff/FiraSans-Heavy.woff diff --git a/ext/fonts/woff/FiraSans-HeavyItalic.woff b/resources/shared/fonts/woff/FiraSans-HeavyItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-HeavyItalic.woff rename to resources/shared/fonts/woff/FiraSans-HeavyItalic.woff diff --git a/ext/fonts/woff/FiraSans-Italic.woff b/resources/shared/fonts/woff/FiraSans-Italic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Italic.woff rename to resources/shared/fonts/woff/FiraSans-Italic.woff diff --git a/ext/fonts/woff/FiraSans-Light.woff b/resources/shared/fonts/woff/FiraSans-Light.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Light.woff rename to resources/shared/fonts/woff/FiraSans-Light.woff diff --git a/ext/fonts/woff/FiraSans-LightItalic.woff b/resources/shared/fonts/woff/FiraSans-LightItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-LightItalic.woff rename to resources/shared/fonts/woff/FiraSans-LightItalic.woff diff --git a/ext/fonts/woff/FiraSans-Medium.woff b/resources/shared/fonts/woff/FiraSans-Medium.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Medium.woff rename to resources/shared/fonts/woff/FiraSans-Medium.woff diff --git a/ext/fonts/woff/FiraSans-MediumItalic.woff b/resources/shared/fonts/woff/FiraSans-MediumItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-MediumItalic.woff rename to resources/shared/fonts/woff/FiraSans-MediumItalic.woff diff --git a/ext/fonts/woff/FiraSans-Regular.woff b/resources/shared/fonts/woff/FiraSans-Regular.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Regular.woff rename to resources/shared/fonts/woff/FiraSans-Regular.woff diff --git a/ext/fonts/woff/FiraSans-SemiBold.woff b/resources/shared/fonts/woff/FiraSans-SemiBold.woff similarity index 100% rename from ext/fonts/woff/FiraSans-SemiBold.woff rename to resources/shared/fonts/woff/FiraSans-SemiBold.woff diff --git a/ext/fonts/woff/FiraSans-SemiBoldItalic.woff b/resources/shared/fonts/woff/FiraSans-SemiBoldItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-SemiBoldItalic.woff rename to resources/shared/fonts/woff/FiraSans-SemiBoldItalic.woff diff --git a/ext/fonts/woff/FiraSans-Thin.woff b/resources/shared/fonts/woff/FiraSans-Thin.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Thin.woff rename to resources/shared/fonts/woff/FiraSans-Thin.woff diff --git a/ext/fonts/woff/FiraSans-ThinItalic.woff b/resources/shared/fonts/woff/FiraSans-ThinItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-ThinItalic.woff rename to resources/shared/fonts/woff/FiraSans-ThinItalic.woff diff --git a/ext/fonts/woff/FiraSans-Two.woff b/resources/shared/fonts/woff/FiraSans-Two.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Two.woff rename to resources/shared/fonts/woff/FiraSans-Two.woff diff --git a/ext/fonts/woff/FiraSans-TwoItalic.woff b/resources/shared/fonts/woff/FiraSans-TwoItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-TwoItalic.woff rename to resources/shared/fonts/woff/FiraSans-TwoItalic.woff diff --git a/ext/fonts/woff/FiraSans-Ultra.woff b/resources/shared/fonts/woff/FiraSans-Ultra.woff similarity index 100% rename from ext/fonts/woff/FiraSans-Ultra.woff rename to resources/shared/fonts/woff/FiraSans-Ultra.woff diff --git a/ext/fonts/woff/FiraSans-UltraItalic.woff b/resources/shared/fonts/woff/FiraSans-UltraItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-UltraItalic.woff rename to resources/shared/fonts/woff/FiraSans-UltraItalic.woff diff --git a/ext/fonts/woff/FiraSans-UltraLight.woff b/resources/shared/fonts/woff/FiraSans-UltraLight.woff similarity index 100% rename from ext/fonts/woff/FiraSans-UltraLight.woff rename to resources/shared/fonts/woff/FiraSans-UltraLight.woff diff --git a/ext/fonts/woff/FiraSans-UltraLightItalic.woff b/resources/shared/fonts/woff/FiraSans-UltraLightItalic.woff similarity index 100% rename from ext/fonts/woff/FiraSans-UltraLightItalic.woff rename to resources/shared/fonts/woff/FiraSans-UltraLightItalic.woff diff --git a/ext/fonts/woff2/FiraMono-Bold.woff2 b/resources/shared/fonts/woff2/FiraMono-Bold.woff2 similarity index 100% rename from ext/fonts/woff2/FiraMono-Bold.woff2 rename to resources/shared/fonts/woff2/FiraMono-Bold.woff2 diff --git a/ext/fonts/woff2/FiraMono-Medium.woff2 b/resources/shared/fonts/woff2/FiraMono-Medium.woff2 similarity index 100% rename from ext/fonts/woff2/FiraMono-Medium.woff2 rename to resources/shared/fonts/woff2/FiraMono-Medium.woff2 diff --git a/ext/fonts/woff2/FiraMono-Regular.woff2 b/resources/shared/fonts/woff2/FiraMono-Regular.woff2 similarity index 100% rename from ext/fonts/woff2/FiraMono-Regular.woff2 rename to resources/shared/fonts/woff2/FiraMono-Regular.woff2 diff --git a/ext/fonts/woff2/FiraSans-Bold.woff2 b/resources/shared/fonts/woff2/FiraSans-Bold.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Bold.woff2 rename to resources/shared/fonts/woff2/FiraSans-Bold.woff2 diff --git a/ext/fonts/woff2/FiraSans-BoldItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-BoldItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-BoldItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-BoldItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Book.woff2 b/resources/shared/fonts/woff2/FiraSans-Book.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Book.woff2 rename to resources/shared/fonts/woff2/FiraSans-Book.woff2 diff --git a/ext/fonts/woff2/FiraSans-BookItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-BookItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-BookItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-BookItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Eight.woff2 b/resources/shared/fonts/woff2/FiraSans-Eight.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Eight.woff2 rename to resources/shared/fonts/woff2/FiraSans-Eight.woff2 diff --git a/ext/fonts/woff2/FiraSans-EightItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-EightItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-EightItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-EightItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-ExtraBold.woff2 b/resources/shared/fonts/woff2/FiraSans-ExtraBold.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-ExtraBold.woff2 rename to resources/shared/fonts/woff2/FiraSans-ExtraBold.woff2 diff --git a/ext/fonts/woff2/FiraSans-ExtraBoldItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-ExtraBoldItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-ExtraBoldItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-ExtraBoldItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-ExtraLight.woff2 b/resources/shared/fonts/woff2/FiraSans-ExtraLight.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-ExtraLight.woff2 rename to resources/shared/fonts/woff2/FiraSans-ExtraLight.woff2 diff --git a/ext/fonts/woff2/FiraSans-ExtraLightItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-ExtraLightItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-ExtraLightItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-ExtraLightItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Four.woff2 b/resources/shared/fonts/woff2/FiraSans-Four.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Four.woff2 rename to resources/shared/fonts/woff2/FiraSans-Four.woff2 diff --git a/ext/fonts/woff2/FiraSans-FourItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-FourItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-FourItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-FourItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Hair.woff2 b/resources/shared/fonts/woff2/FiraSans-Hair.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Hair.woff2 rename to resources/shared/fonts/woff2/FiraSans-Hair.woff2 diff --git a/ext/fonts/woff2/FiraSans-HairItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-HairItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-HairItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-HairItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Heavy.woff2 b/resources/shared/fonts/woff2/FiraSans-Heavy.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Heavy.woff2 rename to resources/shared/fonts/woff2/FiraSans-Heavy.woff2 diff --git a/ext/fonts/woff2/FiraSans-HeavyItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-HeavyItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-HeavyItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-HeavyItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Italic.woff2 b/resources/shared/fonts/woff2/FiraSans-Italic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Italic.woff2 rename to resources/shared/fonts/woff2/FiraSans-Italic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Light.woff2 b/resources/shared/fonts/woff2/FiraSans-Light.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Light.woff2 rename to resources/shared/fonts/woff2/FiraSans-Light.woff2 diff --git a/ext/fonts/woff2/FiraSans-LightItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-LightItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-LightItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-LightItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Medium.woff2 b/resources/shared/fonts/woff2/FiraSans-Medium.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Medium.woff2 rename to resources/shared/fonts/woff2/FiraSans-Medium.woff2 diff --git a/ext/fonts/woff2/FiraSans-MediumItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-MediumItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-MediumItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-MediumItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Regular.woff2 b/resources/shared/fonts/woff2/FiraSans-Regular.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Regular.woff2 rename to resources/shared/fonts/woff2/FiraSans-Regular.woff2 diff --git a/ext/fonts/woff2/FiraSans-SemiBold.woff2 b/resources/shared/fonts/woff2/FiraSans-SemiBold.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-SemiBold.woff2 rename to resources/shared/fonts/woff2/FiraSans-SemiBold.woff2 diff --git a/ext/fonts/woff2/FiraSans-SemiBoldItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-SemiBoldItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-SemiBoldItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-SemiBoldItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Thin.woff2 b/resources/shared/fonts/woff2/FiraSans-Thin.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Thin.woff2 rename to resources/shared/fonts/woff2/FiraSans-Thin.woff2 diff --git a/ext/fonts/woff2/FiraSans-ThinItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-ThinItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-ThinItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-ThinItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Two.woff2 b/resources/shared/fonts/woff2/FiraSans-Two.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Two.woff2 rename to resources/shared/fonts/woff2/FiraSans-Two.woff2 diff --git a/ext/fonts/woff2/FiraSans-TwoItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-TwoItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-TwoItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-TwoItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-Ultra.woff2 b/resources/shared/fonts/woff2/FiraSans-Ultra.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-Ultra.woff2 rename to resources/shared/fonts/woff2/FiraSans-Ultra.woff2 diff --git a/ext/fonts/woff2/FiraSans-UltraItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-UltraItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-UltraItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-UltraItalic.woff2 diff --git a/ext/fonts/woff2/FiraSans-UltraLight.woff2 b/resources/shared/fonts/woff2/FiraSans-UltraLight.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-UltraLight.woff2 rename to resources/shared/fonts/woff2/FiraSans-UltraLight.woff2 diff --git a/ext/fonts/woff2/FiraSans-UltraLightItalic.woff2 b/resources/shared/fonts/woff2/FiraSans-UltraLightItalic.woff2 similarity index 100% rename from ext/fonts/woff2/FiraSans-UltraLightItalic.woff2 rename to resources/shared/fonts/woff2/FiraSans-UltraLightItalic.woff2 diff --git a/ext/icons/arrowhead-down-16.svg b/resources/shared/icons/arrowhead-down-16.svg similarity index 100% rename from ext/icons/arrowhead-down-16.svg rename to resources/shared/icons/arrowhead-down-16.svg diff --git a/ext/icons/arrowhead-up-16.svg b/resources/shared/icons/arrowhead-up-16.svg similarity index 100% rename from ext/icons/arrowhead-up-16.svg rename to resources/shared/icons/arrowhead-up-16.svg diff --git a/ext/icons/back-16.svg b/resources/shared/icons/back-16.svg similarity index 100% rename from ext/icons/back-16.svg rename to resources/shared/icons/back-16.svg diff --git a/ext/icons/icon128.png b/resources/shared/icons/icon128.png similarity index 100% rename from ext/icons/icon128.png rename to resources/shared/icons/icon128.png diff --git a/ext/icons/icon16.png b/resources/shared/icons/icon16.png similarity index 100% rename from ext/icons/icon16.png rename to resources/shared/icons/icon16.png diff --git a/ext/icons/icon48.png b/resources/shared/icons/icon48.png similarity index 100% rename from ext/icons/icon48.png rename to resources/shared/icons/icon48.png diff --git a/ext/icons/icon96.png b/resources/shared/icons/icon96.png similarity index 100% rename from ext/icons/icon96.png rename to resources/shared/icons/icon96.png diff --git a/ext/icons/link-16.svg b/resources/shared/icons/link-16.svg similarity index 100% rename from ext/icons/link-16.svg rename to resources/shared/icons/link-16.svg diff --git a/ext/icons/open-in-new-16.svg b/resources/shared/icons/open-in-new-16.svg similarity index 100% rename from ext/icons/open-in-new-16.svg rename to resources/shared/icons/open-in-new-16.svg diff --git a/ext/icons/refresh-16.svg b/resources/shared/icons/refresh-16.svg similarity index 100% rename from ext/icons/refresh-16.svg rename to resources/shared/icons/refresh-16.svg diff --git a/ext/icons/stop-16.svg b/resources/shared/icons/stop-16.svg similarity index 100% rename from ext/icons/stop-16.svg rename to resources/shared/icons/stop-16.svg diff --git a/ext/js/moment-range.min.js b/resources/shared/js/moment-range.min.js similarity index 100% rename from ext/js/moment-range.min.js rename to resources/shared/js/moment-range.min.js diff --git a/ext/js/moment.min.js b/resources/shared/js/moment.min.js similarity index 100% rename from ext/js/moment.min.js rename to resources/shared/js/moment.min.js