Last active
August 29, 2015 14:21
-
-
Save lelinhtinh/a18ff0b5a79e34105154 to your computer and use it in GitHub Desktop.
Userscript help you backup templates for your forumotion
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 | |
// @resource jsziputils https://gist.githubusercontent.com/baivong/8f32fc8906e3d60b35c3/raw/223cedb102700f74abbb0391aa347c79b5504ec6/jszip-utils.min.js | |
// @resource filesaver https://gist.githubusercontent.com/baivong/f0c9610f386cb33e5824/raw/c0792332aff62767b1a96fccef3eb0b7e678bcd2/FileSaver.min.js | |
// @resource zzFmBackup https://gist.githubusercontent.com/baivong/89a6e2d0bfebafd090d5/raw/51f92e0b746fa584246d002848cf5232a8edc027/zzFmBackup.js | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @run-at document-end | |
// @grant GM_addStyle | |
// @grant GM_getResourceText | |
// ==/UserScript== | |
/** | |
* jsZip (v2.5.0) By Stuart Knightley <http://stuartk.com/jszip> | |
* jszip-utils (v0.0.2) By Stuart Knightley, David Duponchel <http://stuk.github.io/jszip-utils> | |
* FileSaver (2015-05-07) By Eli Grey <http://eligrey.com> | |
* zzFmBackup (v2.0.1) By Zzbaivong <http://www.devs.cf> | |
*/ | |
function addscript(source) { | |
$("<script>", { | |
type: "text/javascript", | |
text: source | |
}).appendTo("head"); | |
} | |
GM_addStyle("#zzBackup fieldset{counter-reset:section;border:1px solid #07f}#zzBackup legend{color:#e000a2}#zzBackup ol{margin:5px 0 15px;list-style:none outside none}#zzBackup li:before{counter-increment:section;content:counter(section) '.';width:30px;display:inline-block;text-align:right;margin-right:5px}.backupOption{font-size:18px;color:#00a8a1}#importNoti strong{color:#DA4FB8}#zzBackup dt label{display:block;margin-top:10px;color:#777}#zzBackup dt label:hover{color:#111}#zzBackup label input:checked ~ span{color:#0094CA}.buttonOne{display:none;margin-top:10px;padding:7px 20px;background:#f90e5e;color:#FFF;font-weight:700;border:3px solid #DDD}.buttonOne:hover{border-color:#444;cursor:pointer}.buttonOne:active{background:#444}#zzBackup :disabled,#zzBackup :disabled ~ span{color:#999;cursor:not-allowed}"); | |
addscript(GM_getResourceText("jszip")); | |
addscript(GM_getResourceText("jsziputils")); | |
addscript(GM_getResourceText("filesaver")); | |
addscript(GM_getResourceText("zzFmBackup")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment