This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
JSZip - A Javascript class for generating and reading zip files | |
<http://stuartk.com/jszip> | |
(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com> | |
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. | |
JSZip uses the library pako released under the MIT license : | |
https://github.com/nodeca/pako/blob/master/LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
JSZipUtils - A collection of cross-browser utilities to go along with JSZip. | |
<http://stuk.github.io/jszip-utils> | |
(c) 2014 Stuart Knightley, David Duponchel | |
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. | |
*/ | |
!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZipUtils=a():"undefined"!=typeof global?global.JSZipUtils=a():"undefined"!=typeof self&&(self.JSZipUtils=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){"use strict";function c(){try{return new window.XMLH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Forumotion backup templates | |
// @namespace http://devs.forumvi.com/ | |
// @version 2.0.1 | |
// @description Export & Import forumotion Templates | |
// @copyright 2014+, Zzbaivong | |
// @icon http://i19.servimg.com/u/f19/18/83/32/63/icon-610.png | |
// @match http://*/admin/index.forum?mode=export* | |
// @match http://*/admin/index.forum?*&mode=export* | |
// @resource jszip https://gist.githubusercontent.com/baivong/a1af02ab10dcc6e1747b/raw/a09f35b86352b83e75013d495045032668ef342d/jszip.min.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var optionsUrl = chrome.extension.getURL("options.html"); | |
chrome.tabs.query({ | |
url: optionsUrl | |
}, function (tabs) { | |
if (tabs.length) { | |
chrome.tabs.update(tabs[0].id, { | |
active: true | |
}); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/a/22601737/4926686 | |
var self = require('sdk/self'), | |
tabs = require('sdk/tabs'); | |
tabs.open({ | |
url: 'about:addons', | |
onReady: function (tab) { | |
tab.attach({ | |
contentScriptWhen: 'end', | |
contentScript: 'AddonManager.getAddonByID("' + self.id + '", function(aAddon) {unsafeWindow.gViewController.commands.cmd_showItemDetails.doCommand(aAddon, true);});' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"boss": true, | |
"curly": true, | |
"eqeqeq": true, | |
"eqnull": true, | |
"expr": true, | |
"immed": true, | |
"noarg": true, | |
"onevar": true, | |
"quotmark": "single", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"language": { | |
"javascript": { | |
"linting.prefer": [ | |
"JSHint" | |
], | |
"linting.usePreferredOnly": true | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reverseString(inputString) { | |
return inputString.split("").reverse().join(""); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arrayMinimumIndex(inputArray) { | |
var indexOfMinimum = 0; | |
for (var i = 1; i < inputArray.length; i++) { | |
if (inputArray[i] < inputArray[indexOfMinimum]) { | |
indexOfMinimum = i; | |
} | |
} | |
return indexOfMinimum; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/a/10769621 | |
function colorTrace(msg, color) { | |
console.log("%c" + msg, "color:" + color + ";font-weight:bold;"); | |
} | |
colorTrace("Test Me", "red"); |