├── screenshot.png ├── screenshotd.png ├── docs ├── wbb.json └── index.html ├── .gitattributes ├── SECURITY.md ├── package.json ├── .gitignore ├── Gruntfile.js ├── readme.template.md ├── readme.md ├── yarn.lock └── whutbbcode.user.js /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hateradio/wbb/HEAD/screenshot.png -------------------------------------------------------------------------------- /screenshotd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hateradio/wbb/HEAD/screenshotd.png -------------------------------------------------------------------------------- /docs/wbb.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "WhutBBCode?", 3 | "version": 8500, 4 | "page": "https://greasyfork.org/en/scripts/1024-whutbbcode" 5 | } 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 8.3.x | :white_check_mark: | 11 | 12 | ## Reporting a Vulnerability 13 | 14 | Use this section to tell people how to report a vulnerability. 15 | 16 | Tell them where to go, how often they can expect to get an update on a 17 | reported vulnerability, what to expect if the vulnerability is accepted or 18 | declined, etc. 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wbbc", 3 | "version": "8.5.0.0", 4 | "description": "This is a cross-browser BBCode helper. It works with Gazelle and other sites . . . CDs and waffles, mmm.", 5 | "main": "whutbbcode.user.js", 6 | "directories": { 7 | "doc": "docs" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1", 11 | "build": "grunt" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/hateradio/wbb.git" 16 | }, 17 | "keywords": [ 18 | "wbbc", 19 | "wbb", 20 | "whutbbcode", 21 | "whutbb", 22 | "bbcode" 23 | ], 24 | "author": "hateradio", 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "https://github.com/hateradio/wbb/issues" 28 | }, 29 | "homepage": "https://github.com/hateradio/wbb#readme", 30 | "devDependencies": { 31 | "syntax-error": "^1.4.0", 32 | "grunt": "^1.5.3" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directories 27 | node_modules 28 | jspm_packages 29 | 30 | # Optional npm cache directory 31 | .npm 32 | 33 | # Optional REPL history 34 | .node_repl_history 35 | 36 | # ========================= 37 | # Operating System Files 38 | # ========================= 39 | 40 | # OSX 41 | # ========================= 42 | 43 | .DS_Store 44 | .AppleDouble 45 | .LSOverride 46 | 47 | # Thumbnails 48 | ._* 49 | 50 | # Files that might appear in the root of a volume 51 | .DocumentRevisions-V100 52 | .fseventsd 53 | .Spotlight-V100 54 | .TemporaryItems 55 | .Trashes 56 | .VolumeIcon.icns 57 | 58 | # Directories potentially created on remote AFP share 59 | .AppleDB 60 | .AppleDesktop 61 | Network Trash Folder 62 | Temporary Items 63 | .apdisk 64 | 65 | # Windows 66 | # ========================= 67 | 68 | # Windows image file caches 69 | Thumbs.db 70 | ehthumbs.db 71 | 72 | # Folder config file 73 | Desktop.ini 74 | 75 | # Recycle Bin used on file shares 76 | $RECYCLE.BIN/ 77 | 78 | # Windows Installer files 79 | *.cab 80 | *.msi 81 | *.msm 82 | *.msp 83 | 84 | # Windows shortcuts 85 | *.lnk 86 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | WhutBBCode? 9 | 10 | 11 | 12 | 90 | 91 | 92 | 93 |
94 |
95 |

WhutBBCode?

96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
gethttps://greasyfork.org/en/scripts/1024-whutbbcode
githttps://github.com/hateradio/wbb
108 |
109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 3 | const fs = require('fs'); 4 | const check = require('syntax-error'); 5 | const js = fs.readFileSync('whutbbcode.user.js', 'utf8'); 6 | 7 | // Project configuration. 8 | grunt.initConfig({ 9 | pkg: grunt.file.readJSON('package.json') 10 | }); 11 | 12 | function getVersions() { 13 | let version, rawVersion, updateVersion; 14 | 15 | version = js.match(/version\s+(\d+(?:.+)?)/)[1]; 16 | rawVersion = version.replace(/[.]/g, '').padEnd(4, '0'); // padEnd requires node >= 8.x 17 | updateVersion = js.match(/version\:\s?(\d+)/)[1]; 18 | 19 | return { 20 | version, 21 | rawVersion, 22 | updateVersion 23 | }; 24 | } 25 | 26 | function writeJson(obj, filename) { 27 | const pretty = JSON.stringify(obj, null, 2) + '\n'; 28 | 29 | fs.writeFileSync(filename, pretty, 'utf8'); 30 | 31 | grunt.log.write(`Updated ${filename}`).ok(); 32 | 33 | return true; 34 | } 35 | 36 | grunt.registerTask('syntax', 'Checking script syntax', function () { 37 | const js = fs.readFileSync('whutbbcode.user.js', 'utf8'); 38 | const error = check(js, 'whutbbcode.user.js') 39 | 40 | grunt.log.write(error) 41 | if (error) { 42 | grunt.log.error(error); 43 | return false; 44 | } 45 | 46 | grunt.log.write(`No syntax errors`).ok(); 47 | }); 48 | 49 | grunt.registerTask('version', 'Check version', function () { 50 | const { 51 | version, 52 | rawVersion, 53 | updateVersion 54 | } = getVersions(); 55 | 56 | if (updateVersion !== rawVersion) { 57 | grunt.log.error('Versions do not match. Update them correctly!'); 58 | grunt.log.write(`Script Header: ${version}, JSON: ${rawVersion}, Source: ${updateVersion}`); 59 | return false; 60 | } 61 | 62 | grunt.log.write(`Script and update JSON versions are ${version} and ${updateVersion}`).ok(); 63 | }); 64 | 65 | grunt.registerTask('update', 'Generate update.json', function () { 66 | const update = { 67 | name: 'WhutBBCode?', 68 | version: +getVersions().updateVersion, 69 | page: "https://greasyfork.org/en/scripts/1024-whutbbcode" 70 | }; 71 | 72 | return writeJson(update, './docs/wbb.json'); 73 | }); 74 | 75 | grunt.registerTask('package', 'Update package.json', function () { 76 | const pkg = JSON.parse(fs.readFileSync('package.json')); 77 | 78 | const [major, minor = 0, mod = 0, fix = 0] = getVersions().version.split(/[.]/); 79 | 80 | pkg.version = `${major}.${minor}.${mod}.${fix}`; 81 | 82 | return writeJson(pkg, 'package.json'); 83 | }); 84 | 85 | grunt.registerTask('readme', 'Generate readme.md', function () { 86 | let template, updates, md; 87 | 88 | template = fs.readFileSync('readme.template.md', 'utf8'); 89 | updates = js.substring(js.indexOf('### Updates'), js.indexOf('// #Updates') - 1).trim(); 90 | md = template.replace('### Updates', updates) + '\n'; 91 | 92 | fs.writeFileSync('readme.md', md, 'utf8'); 93 | 94 | grunt.log.write('Updated readme.md').ok(); 95 | }); 96 | 97 | grunt.registerTask('default', `Let's Go!`, function () { 98 | grunt.log.write('Ensuring all is right . . .').ok(); 99 | 100 | grunt.task.run('syntax'); 101 | grunt.task.run('version'); 102 | grunt.task.run('readme'); 103 | grunt.task.run('update'); 104 | grunt.task.run('package'); 105 | 106 | grunt.log.write(`PS: don't forget about @updated`); 107 | }); 108 | 109 | }; 110 | -------------------------------------------------------------------------------- /readme.template.md: -------------------------------------------------------------------------------- 1 | ## WhutBBCode? Overview 2 | 3 | [WhutBBCode? Screenshot](https://raw.githubusercontent.com/hateradio/wbb/master/screenshot.png "WhutBBCode?") 4 | 5 | _Dark Theme_ 6 | 7 | [WhutBBCode? Screenshot](https://raw.githubusercontent.com/hateradio/wbb/master/screenshotd.png "WhutBBCode?") 8 | 9 | ### Install and Source 10 | 11 | Install it from Greasy Fork . . . [https://greasyfork.org/en/scripts/1024-whutbbcode](https://greasyfork.org/en/scripts/1024-whutbbcode "WhutBBCode? Install") 12 | 13 | Check out the source . . . [https://github.com/hateradio/wbb](https://github.com/hateradio/wbb "WhutBBCode? Source Code") 14 | 15 | _As of version 3.0, "WhutBBCode?" has been renamed, so you might have to uninstall previous versions of "WhutBBCode? for What.CD and Waffles.fm" from your user scripts in Greasemonkey/Tampermonkey._ 16 | 17 | ### Compatibility 18 | 19 | Most Gazelle sites are also compatible; however, they have to be included manually. **If you want me to add a site, please send me a message or pull request!** 20 | 21 | #### Sites 22 | 23 | * Waffles 24 | * Indietorrents 25 | * Cinemageddon 26 | * PTP 27 | * RED, GG, nWCD, BS, bs, and more . . . 28 | * Apollo 29 | * What (Archived in the code) 30 | 31 | Note that you have to save your _settings_ on every site. 32 | 33 | #### Browsers 34 | 35 | * Firefox 4+ 36 | * Opera 11+ 37 | * Chrome 10+ 38 | * Safari 5+ 39 | 40 | The script is known to work with the [Tampermonkey](https://tampermonkey.net/?browser=safari "Tampermonkey") extension. 41 | 42 | ### Shortcut Keys 43 | 44 | Shortcut keys were only tested in the above-mentioned browsers. 45 | 46 | 47 | * `Ctrl + b = [b][/b]` (Bold) 48 | * `Ctrl + i = [i][/i]` (Italic) 49 | * `Ctrl + u = [u][/u]` (Underline) 50 | * `Ctrl + s = [s][/s]` (Strike) 51 | * `Ctrl + k = [#]` (Ordered List Item - What.CD only) 52 | * `Ctrl + l = [*]` (List Item) 53 | * `Ctrl + h = [url=][/url]` (Link) 54 | * `Ctrl + m = [img][/img]` (Image) 55 | * `Ctrl + d = {Delete}` (Erases your message!) 56 | 57 | There are several more depending on the site. 58 | 59 | ### Updates 60 | 61 | #### 4.9.4 62 | 63 | * adds support for secret-cinema.pw, fixes efectodoppler 64 | 65 | #### 4.9.3 66 | 67 | * adds support for efectodoppler.pw 68 | 69 | #### 4.9.2 70 | 71 | * adds support for reportsv2.php 72 | 73 | #### 4.9.1 74 | 75 | * adds update check with github json link (cors support) 76 | 77 | #### 4.9 78 | 79 | * fix width when in sidebar 80 | * adds tehconnection, oppaitime, morethan.tv, alpharatio 81 | * remove update check 82 | * remove bwtm, nostream 83 | 84 | #### 4.8 85 | 86 | * force button container width and text centering 87 | * shortcut information on button title 88 | * mac shortcut keys 89 | * red <=> pth 90 | 91 | #### 4.7 92 | 93 | * code and emoticon refactor 94 | * pth emoticon 95 | * adds hidra.zone support 96 | 97 | #### 4.6 98 | 99 | * edit boxes should now work in Chrome 100 | 101 | #### 4.5 102 | 103 | * adds support for PTH, GG, nWCD, Nostream, BWTM, BS, bs 104 | * changes some styling for shortcut information 105 | 106 | #### 4 107 | 108 | * adds apollo support 109 | * enabled all possible BBCode tags, thanks inverness 110 | * fixes emoticons, thanks toy 111 | 112 | #### 3.1 113 | 114 | * Replaces Waffles.fm for ch 115 | * Fixes Waffles emoticons 116 | * Fixes .gz with .gazelle property 117 | 118 | #### 3.0.1 - 3.0.2 119 | 120 | * Resolves Chrome errors 121 | * Removes extraneous gray text CSS 122 | * Adds mature tag 123 | 124 | #### 3 125 | 126 | * Brand new, completely rewritten code base 127 | * Brand new Glyph icons from the Bootstrap source 128 | * More customizable, just read the source comments! 129 | * Same great functionality 130 | 131 | #### 2 132 | 133 | * WhutBBCode? 2.0 looks a bit different for What.CD because of some new buttons. Overall, the align button has been separated for each individual type. 134 | 135 | ### Newer Gazelle Versions 136 | 137 | * Use `[code][/code]` when you want to make an item within a line mono-spaced, like I did just now. Use it for functions, (X)HTML, or any other code snippets. 138 | * Use `[important][/important]` to mark something urgent. 139 | * Use `[#]` to make ordered lists. 140 | 141 | For reference, the list above is an unordered list; the list below is an ordered list. You don't use 1, 2, 3\. They are included automatically. 142 | 143 | 1. This is the first item. 144 | 2. This is the second item. 145 | 3. This is the third item. 146 | 147 | 148 | ### Excluding Textareas from WhutBBCode? 149 | 150 | Note: If you add "noWhutBB" to the class attribute of a textarea, WhutBBCode? will not do anything to to that text box. It will get ignored. 151 | 152 | #### Example 153 | 154 | ``` 155 | 156 | ``` -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## WhutBBCode? Overview 2 | 3 | [WhutBBCode? Screenshot](https://raw.githubusercontent.com/hateradio/wbb/master/screenshot.png "WhutBBCode?") 4 | 5 | _Dark Theme_ 6 | 7 | [WhutBBCode? Screenshot](https://raw.githubusercontent.com/hateradio/wbb/master/screenshotd.png "WhutBBCode?") 8 | 9 | ### Install and Source 10 | 11 | Install it from Greasy Fork . . . [https://greasyfork.org/en/scripts/1024-whutbbcode](https://greasyfork.org/en/scripts/1024-whutbbcode "WhutBBCode? Install") 12 | 13 | Check out the source . . . [https://github.com/hateradio/wbb](https://github.com/hateradio/wbb "WhutBBCode? Source Code") 14 | 15 | _As of version 3.0, "WhutBBCode?" has been renamed, so you might have to uninstall previous versions of "WhutBBCode? for What.CD and Waffles.fm" from your user scripts in Greasemonkey/Tampermonkey._ 16 | 17 | ### Compatibility 18 | 19 | Most Gazelle sites are also compatible; however, they have to be included manually. **If you want me to add a site, please send me a message or pull request!** 20 | 21 | #### Sites 22 | 23 | * Waffles 24 | * Indietorrents 25 | * Cinemageddon 26 | * PTP 27 | * RED, GG, nWCD, BS, bs, and more . . . 28 | * Apollo 29 | * What (Archived in the code) 30 | 31 | Note that you have to save your _settings_ on every site. 32 | 33 | #### Browsers 34 | 35 | * Firefox 4+ 36 | * Opera 11+ 37 | * Chrome 10+ 38 | * Safari 5+ 39 | 40 | The script is known to work with the [Tampermonkey](https://tampermonkey.net/?browser=safari "Tampermonkey") extension. 41 | 42 | ### Shortcut Keys 43 | 44 | Shortcut keys were only tested in the above-mentioned browsers. 45 | 46 | 47 | * `Ctrl + b = [b][/b]` (Bold) 48 | * `Ctrl + i = [i][/i]` (Italic) 49 | * `Ctrl + u = [u][/u]` (Underline) 50 | * `Ctrl + s = [s][/s]` (Strike) 51 | * `Ctrl + k = [#]` (Ordered List Item - What.CD only) 52 | * `Ctrl + l = [*]` (List Item) 53 | * `Ctrl + h = [url=][/url]` (Link) 54 | * `Ctrl + m = [img][/img]` (Image) 55 | * `Ctrl + d = {Delete}` (Erases your message!) 56 | 57 | There are several more depending on the site. 58 | 59 | ### Updates 60 | 61 | ##### 8.5 62 | 63 | * +https 64 | 65 | #### 8.4 66 | 67 | * -.ch . . . +.sh 68 | 69 | #### 8.3.1 70 | 71 | * SVG icon fix 72 | 73 | #### 8.3 74 | 75 | * Adds dark theme support 76 | 77 | #### 8.2 78 | 79 | * Replace className and set/getAttribute with classList and dataset 80 | * Fix a margin issue for some stylesheets 81 | 82 | #### 8.1.1 83 | 84 | * Add support for torrentday.com, passthepopcorn.me, myanonamouse.net, broadcasthe.net 85 | 86 | #### 8.1 87 | 88 | * Enhancement: Edit button now re-creates the WhutBBCode instance instead of overwriting it 89 | 90 | #### 8 91 | 92 | * New Bootstrap icons 93 | * New button layouts 94 | * New button text (for option with no icons) 95 | * Use icon names from Bootstrap 96 | * New blueprint for orph 97 | 98 | #### 7 99 | 100 | * removes IE code 101 | * fixes icons for `[hr]` and `[pad]` 102 | 103 | #### 6.6 104 | 105 | * replaces `keypress` with `keydown` in Firefox 106 | 107 | #### 6.5 108 | 109 | * fixes preview in inbox 110 | * adds `hr` button 111 | 112 | #### 6 113 | 114 | * removes apl, adds orph 115 | 116 | #### 5.3 117 | * adds new BB code tags for RED (`[pad]`, `[php]`) 118 | * adds a line break before list item tags 119 | * makes sure to only add unique emoticons 120 | 121 | #### 5.2 122 | * changes JSON version from string to int 123 | 124 | #### 5.1.1 125 | * checks that site configuration exists 126 | * adds grunt and node package files 127 | 128 | #### 5.1 129 | 130 | * removes unnecessary site configurations 131 | 132 | #### 5 133 | 134 | * simplifies Gazelle site inclusion, only requires to use @include 135 | 136 | #### 4.9.4 137 | 138 | * adds support for secret-cinema.pw, fixes efectodoppler 139 | 140 | #### 4.9.3 141 | 142 | * adds support for efectodoppler.pw 143 | 144 | #### 4.9.2 145 | 146 | * adds support for reportsv2.php 147 | 148 | #### 4.9.1 149 | 150 | * adds update check with github json link (cors support) 151 | 152 | #### 4.9 153 | 154 | * fix width when in sidebar 155 | * adds tehconnection, oppaitime, morethan.tv, alpharatio 156 | * remove update check 157 | * remove bwtm, nostream 158 | 159 | #### 4.8 160 | 161 | * force button container width and text centering 162 | * shortcut information on button title 163 | * mac shortcut keys 164 | * red <=> pth 165 | 166 | #### 4.7 167 | 168 | * code and emoticon refactor 169 | * pth emoticon 170 | * adds hidra.zone support 171 | 172 | #### 4.6 173 | 174 | * edit boxes should now work in Chrome 175 | 176 | #### 4.5 177 | 178 | * adds support for PTH, GG, nWCD, Nostream, BWTM, BS, bs 179 | * changes some styling for shortcut information 180 | 181 | #### 4 182 | 183 | * adds apollo support 184 | * enabled all possible BBCode tags, thanks inverness 185 | * fixes emoticons, thanks toy 186 | 187 | #### 3.1 188 | 189 | * Replaces Waffles.fm for ch 190 | * Fixes Waffles emoticons 191 | * Fixes .gz with .gazelle property 192 | 193 | #### 3.0.1 - 3.0.2 194 | 195 | * Resolves Chrome errors 196 | * Removes extraneous gray text CSS 197 | * Adds mature tag 198 | 199 | #### 3 200 | 201 | * Brand new, completely rewritten code base 202 | * Brand new Glyph icons from the Bootstrap source 203 | * More customizable, just read the source comments! 204 | * Same great functionality 205 | 206 | #### 2 207 | 208 | * WhutBBCode? 2.0 looks a bit different for What.CD because of some new buttons. Overall, the align button has been separated for each individual type. 209 | 210 | ### Newer Gazelle Versions 211 | 212 | * Use `[code][/code]` when you want to make an item within a line mono-spaced, like I did just now. Use it for functions, (X)HTML, or any other code snippets. 213 | * Use `[important][/important]` to mark something urgent. 214 | * Use `[#]` to make ordered lists. 215 | 216 | For reference, the list above is an unordered list; the list below is an ordered list. You don't use 1, 2, 3\. They are included automatically. 217 | 218 | 1. This is the first item. 219 | 2. This is the second item. 220 | 3. This is the third item. 221 | 222 | 223 | ### Excluding Textareas from WhutBBCode? 224 | 225 | Note: If you add "noWhutBB" to the class attribute of a textarea, WhutBBCode? will not do anything to to that text box. It will get ignored. 226 | 227 | #### Example 228 | 229 | ``` 230 | 231 | ``` 232 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | abbrev@1: 6 | version "1.1.1" 7 | resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" 8 | integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== 9 | 10 | acorn-node@^1.2.0: 11 | version "1.8.2" 12 | resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8" 13 | integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A== 14 | dependencies: 15 | acorn "^7.0.0" 16 | acorn-walk "^7.0.0" 17 | xtend "^4.0.2" 18 | 19 | acorn-walk@^7.0.0: 20 | version "7.2.0" 21 | resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" 22 | integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== 23 | 24 | acorn@^7.0.0: 25 | version "7.4.1" 26 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" 27 | integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== 28 | 29 | ansi-styles@^4.1.0: 30 | version "4.3.0" 31 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 32 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== 33 | dependencies: 34 | color-convert "^2.0.1" 35 | 36 | argparse@^1.0.7: 37 | version "1.0.10" 38 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 39 | integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== 40 | dependencies: 41 | sprintf-js "~1.0.2" 42 | 43 | array-each@^1.0.1: 44 | version "1.0.1" 45 | resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" 46 | integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= 47 | 48 | array-slice@^1.0.0: 49 | version "1.1.0" 50 | resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" 51 | integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== 52 | 53 | async@~3.2.0: 54 | version "3.2.3" 55 | resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" 56 | integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== 57 | 58 | balanced-match@^1.0.0: 59 | version "1.0.0" 60 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 61 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 62 | 63 | brace-expansion@^1.1.7: 64 | version "1.1.11" 65 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 66 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 67 | dependencies: 68 | balanced-match "^1.0.0" 69 | concat-map "0.0.1" 70 | 71 | braces@^3.0.3: 72 | version "3.0.3" 73 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" 74 | integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== 75 | dependencies: 76 | fill-range "^7.1.1" 77 | 78 | chalk@~4.1.0: 79 | version "4.1.1" 80 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" 81 | integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== 82 | dependencies: 83 | ansi-styles "^4.1.0" 84 | supports-color "^7.1.0" 85 | 86 | color-convert@^2.0.1: 87 | version "2.0.1" 88 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 89 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 90 | dependencies: 91 | color-name "~1.1.4" 92 | 93 | color-name@~1.1.4: 94 | version "1.1.4" 95 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 96 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 97 | 98 | colors@~1.1.2: 99 | version "1.1.2" 100 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" 101 | integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= 102 | 103 | concat-map@0.0.1: 104 | version "0.0.1" 105 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 106 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 107 | 108 | dateformat@~4.6.2: 109 | version "4.6.3" 110 | resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" 111 | integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA== 112 | 113 | detect-file@^1.0.0: 114 | version "1.0.0" 115 | resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" 116 | integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= 117 | 118 | esprima@^4.0.0: 119 | version "4.0.1" 120 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 121 | integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== 122 | 123 | eventemitter2@~0.4.13: 124 | version "0.4.14" 125 | resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" 126 | integrity sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas= 127 | 128 | exit@~0.1.2: 129 | version "0.1.2" 130 | resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" 131 | integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= 132 | 133 | expand-tilde@^2.0.0, expand-tilde@^2.0.2: 134 | version "2.0.2" 135 | resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" 136 | integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= 137 | dependencies: 138 | homedir-polyfill "^1.0.1" 139 | 140 | extend@^3.0.2: 141 | version "3.0.2" 142 | resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" 143 | integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== 144 | 145 | fill-range@^7.1.1: 146 | version "7.1.1" 147 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" 148 | integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== 149 | dependencies: 150 | to-regex-range "^5.0.1" 151 | 152 | findup-sync@^4.0.0: 153 | version "4.0.0" 154 | resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-4.0.0.tgz#956c9cdde804052b881b428512905c4a5f2cdef0" 155 | integrity sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ== 156 | dependencies: 157 | detect-file "^1.0.0" 158 | is-glob "^4.0.0" 159 | micromatch "^4.0.2" 160 | resolve-dir "^1.0.1" 161 | 162 | findup-sync@~5.0.0: 163 | version "5.0.0" 164 | resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-5.0.0.tgz#54380ad965a7edca00cc8f63113559aadc541bd2" 165 | integrity sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ== 166 | dependencies: 167 | detect-file "^1.0.0" 168 | is-glob "^4.0.3" 169 | micromatch "^4.0.4" 170 | resolve-dir "^1.0.1" 171 | 172 | fined@^1.2.0: 173 | version "1.2.0" 174 | resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" 175 | integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== 176 | dependencies: 177 | expand-tilde "^2.0.2" 178 | is-plain-object "^2.0.3" 179 | object.defaults "^1.1.0" 180 | object.pick "^1.2.0" 181 | parse-filepath "^1.0.1" 182 | 183 | flagged-respawn@^1.0.1: 184 | version "1.0.1" 185 | resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" 186 | integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== 187 | 188 | for-in@^1.0.1: 189 | version "1.0.2" 190 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" 191 | integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= 192 | 193 | for-own@^1.0.0: 194 | version "1.0.0" 195 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" 196 | integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= 197 | dependencies: 198 | for-in "^1.0.1" 199 | 200 | fs.realpath@^1.0.0: 201 | version "1.0.0" 202 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 203 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 204 | 205 | function-bind@^1.1.1: 206 | version "1.1.1" 207 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" 208 | integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== 209 | 210 | getobject@~1.0.0: 211 | version "1.0.0" 212 | resolved "https://registry.yarnpkg.com/getobject/-/getobject-1.0.0.tgz#27eeb6394716cfb6adcef275a33c2752df9ca49a" 213 | integrity sha512-tbUz6AKKKr2YiMB+fLWIgq5ZeBOobop9YMMAU9dC54/ot2ksMXt3DOFyBuhZw6ptcVszEykgByK20j7W9jHFag== 214 | 215 | glob@~7.1.6: 216 | version "7.1.7" 217 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" 218 | integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== 219 | dependencies: 220 | fs.realpath "^1.0.0" 221 | inflight "^1.0.4" 222 | inherits "2" 223 | minimatch "^3.0.4" 224 | once "^1.3.0" 225 | path-is-absolute "^1.0.0" 226 | 227 | global-modules@^1.0.0: 228 | version "1.0.0" 229 | resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" 230 | integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== 231 | dependencies: 232 | global-prefix "^1.0.1" 233 | is-windows "^1.0.1" 234 | resolve-dir "^1.0.0" 235 | 236 | global-prefix@^1.0.1: 237 | version "1.0.2" 238 | resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" 239 | integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= 240 | dependencies: 241 | expand-tilde "^2.0.2" 242 | homedir-polyfill "^1.0.1" 243 | ini "^1.3.4" 244 | is-windows "^1.0.1" 245 | which "^1.2.14" 246 | 247 | grunt-cli@~1.4.3: 248 | version "1.4.3" 249 | resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.4.3.tgz#22c9f1a3d2780bf9b0d206e832e40f8f499175ff" 250 | integrity sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ== 251 | dependencies: 252 | grunt-known-options "~2.0.0" 253 | interpret "~1.1.0" 254 | liftup "~3.0.1" 255 | nopt "~4.0.1" 256 | v8flags "~3.2.0" 257 | 258 | grunt-known-options@~2.0.0: 259 | version "2.0.0" 260 | resolved "https://registry.yarnpkg.com/grunt-known-options/-/grunt-known-options-2.0.0.tgz#cac641e897f9a0a680b8c9839803d35f3325103c" 261 | integrity sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA== 262 | 263 | grunt-legacy-log-utils@~2.1.0: 264 | version "2.1.0" 265 | resolved "https://registry.yarnpkg.com/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz#49a8c7dc74051476dcc116c32faf9db8646856ef" 266 | integrity sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw== 267 | dependencies: 268 | chalk "~4.1.0" 269 | lodash "~4.17.19" 270 | 271 | grunt-legacy-log@~3.0.0: 272 | version "3.0.0" 273 | resolved "https://registry.yarnpkg.com/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz#1c6eaf92371ea415af31ea84ce50d434ef6d39c4" 274 | integrity sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA== 275 | dependencies: 276 | colors "~1.1.2" 277 | grunt-legacy-log-utils "~2.1.0" 278 | hooker "~0.2.3" 279 | lodash "~4.17.19" 280 | 281 | grunt-legacy-util@~2.0.1: 282 | version "2.0.1" 283 | resolved "https://registry.yarnpkg.com/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz#0f929d13a2faf9988c9917c82bff609e2d9ba255" 284 | integrity sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w== 285 | dependencies: 286 | async "~3.2.0" 287 | exit "~0.1.2" 288 | getobject "~1.0.0" 289 | hooker "~0.2.3" 290 | lodash "~4.17.21" 291 | underscore.string "~3.3.5" 292 | which "~2.0.2" 293 | 294 | grunt@^1.5.3: 295 | version "1.6.1" 296 | resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.6.1.tgz#0b4dd1524f26676dcf45d8f636b8d9061a8ede16" 297 | integrity sha512-/ABUy3gYWu5iBmrUSRBP97JLpQUm0GgVveDCp6t3yRNIoltIYw7rEj3g5y1o2PGPR2vfTRGa7WC/LZHLTXnEzA== 298 | dependencies: 299 | dateformat "~4.6.2" 300 | eventemitter2 "~0.4.13" 301 | exit "~0.1.2" 302 | findup-sync "~5.0.0" 303 | glob "~7.1.6" 304 | grunt-cli "~1.4.3" 305 | grunt-known-options "~2.0.0" 306 | grunt-legacy-log "~3.0.0" 307 | grunt-legacy-util "~2.0.1" 308 | iconv-lite "~0.6.3" 309 | js-yaml "~3.14.0" 310 | minimatch "~3.0.4" 311 | nopt "~3.0.6" 312 | 313 | has-flag@^4.0.0: 314 | version "4.0.0" 315 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 316 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 317 | 318 | has@^1.0.3: 319 | version "1.0.3" 320 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" 321 | integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== 322 | dependencies: 323 | function-bind "^1.1.1" 324 | 325 | homedir-polyfill@^1.0.1: 326 | version "1.0.3" 327 | resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" 328 | integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== 329 | dependencies: 330 | parse-passwd "^1.0.0" 331 | 332 | hooker@~0.2.3: 333 | version "0.2.3" 334 | resolved "https://registry.yarnpkg.com/hooker/-/hooker-0.2.3.tgz#b834f723cc4a242aa65963459df6d984c5d3d959" 335 | integrity sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk= 336 | 337 | iconv-lite@~0.6.3: 338 | version "0.6.3" 339 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" 340 | integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== 341 | dependencies: 342 | safer-buffer ">= 2.1.2 < 3.0.0" 343 | 344 | inflight@^1.0.4: 345 | version "1.0.6" 346 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 347 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 348 | dependencies: 349 | once "^1.3.0" 350 | wrappy "1" 351 | 352 | inherits@2: 353 | version "2.0.3" 354 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 355 | integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= 356 | 357 | ini@^1.3.4: 358 | version "1.3.8" 359 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" 360 | integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== 361 | 362 | interpret@~1.1.0: 363 | version "1.1.0" 364 | resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" 365 | integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ= 366 | 367 | is-absolute@^1.0.0: 368 | version "1.0.0" 369 | resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" 370 | integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== 371 | dependencies: 372 | is-relative "^1.0.0" 373 | is-windows "^1.0.1" 374 | 375 | is-core-module@^2.11.0: 376 | version "2.12.1" 377 | resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" 378 | integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== 379 | dependencies: 380 | has "^1.0.3" 381 | 382 | is-extglob@^2.1.1: 383 | version "2.1.1" 384 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 385 | integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== 386 | 387 | is-glob@^4.0.0, is-glob@^4.0.3: 388 | version "4.0.3" 389 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" 390 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== 391 | dependencies: 392 | is-extglob "^2.1.1" 393 | 394 | is-number@^7.0.0: 395 | version "7.0.0" 396 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 397 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 398 | 399 | is-plain-object@^2.0.3, is-plain-object@^2.0.4: 400 | version "2.0.4" 401 | resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" 402 | integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== 403 | dependencies: 404 | isobject "^3.0.1" 405 | 406 | is-relative@^1.0.0: 407 | version "1.0.0" 408 | resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" 409 | integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== 410 | dependencies: 411 | is-unc-path "^1.0.0" 412 | 413 | is-unc-path@^1.0.0: 414 | version "1.0.0" 415 | resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" 416 | integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== 417 | dependencies: 418 | unc-path-regex "^0.1.2" 419 | 420 | is-windows@^1.0.1: 421 | version "1.0.2" 422 | resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" 423 | integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== 424 | 425 | isexe@^2.0.0: 426 | version "2.0.0" 427 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 428 | integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= 429 | 430 | isobject@^3.0.0, isobject@^3.0.1: 431 | version "3.0.1" 432 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" 433 | integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= 434 | 435 | js-yaml@~3.14.0: 436 | version "3.14.1" 437 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" 438 | integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== 439 | dependencies: 440 | argparse "^1.0.7" 441 | esprima "^4.0.0" 442 | 443 | kind-of@^6.0.2: 444 | version "6.0.3" 445 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" 446 | integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== 447 | 448 | liftup@~3.0.1: 449 | version "3.0.1" 450 | resolved "https://registry.yarnpkg.com/liftup/-/liftup-3.0.1.tgz#1cb81aff0f368464ed3a5f1a7286372d6b1a60ce" 451 | integrity sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw== 452 | dependencies: 453 | extend "^3.0.2" 454 | findup-sync "^4.0.0" 455 | fined "^1.2.0" 456 | flagged-respawn "^1.0.1" 457 | is-plain-object "^2.0.4" 458 | object.map "^1.0.1" 459 | rechoir "^0.7.0" 460 | resolve "^1.19.0" 461 | 462 | lodash@~4.17.19, lodash@~4.17.21: 463 | version "4.17.21" 464 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" 465 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== 466 | 467 | make-iterator@^1.0.0: 468 | version "1.0.1" 469 | resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" 470 | integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== 471 | dependencies: 472 | kind-of "^6.0.2" 473 | 474 | map-cache@^0.2.0: 475 | version "0.2.2" 476 | resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" 477 | integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= 478 | 479 | micromatch@^4.0.2, micromatch@^4.0.4: 480 | version "4.0.8" 481 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" 482 | integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== 483 | dependencies: 484 | braces "^3.0.3" 485 | picomatch "^2.3.1" 486 | 487 | minimatch@^3.0.4: 488 | version "3.1.2" 489 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" 490 | integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== 491 | dependencies: 492 | brace-expansion "^1.1.7" 493 | 494 | minimatch@~3.0.4: 495 | version "3.0.8" 496 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" 497 | integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== 498 | dependencies: 499 | brace-expansion "^1.1.7" 500 | 501 | nopt@~3.0.6: 502 | version "3.0.6" 503 | resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" 504 | integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= 505 | dependencies: 506 | abbrev "1" 507 | 508 | nopt@~4.0.1: 509 | version "4.0.3" 510 | resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" 511 | integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== 512 | dependencies: 513 | abbrev "1" 514 | osenv "^0.1.4" 515 | 516 | object.defaults@^1.1.0: 517 | version "1.1.0" 518 | resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" 519 | integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= 520 | dependencies: 521 | array-each "^1.0.1" 522 | array-slice "^1.0.0" 523 | for-own "^1.0.0" 524 | isobject "^3.0.0" 525 | 526 | object.map@^1.0.1: 527 | version "1.0.1" 528 | resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" 529 | integrity sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w== 530 | dependencies: 531 | for-own "^1.0.0" 532 | make-iterator "^1.0.0" 533 | 534 | object.pick@^1.2.0: 535 | version "1.3.0" 536 | resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" 537 | integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= 538 | dependencies: 539 | isobject "^3.0.1" 540 | 541 | once@^1.3.0: 542 | version "1.4.0" 543 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 544 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 545 | dependencies: 546 | wrappy "1" 547 | 548 | os-homedir@^1.0.0: 549 | version "1.0.2" 550 | resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 551 | integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= 552 | 553 | os-tmpdir@^1.0.0: 554 | version "1.0.2" 555 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 556 | integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= 557 | 558 | osenv@^0.1.4: 559 | version "0.1.5" 560 | resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" 561 | integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== 562 | dependencies: 563 | os-homedir "^1.0.0" 564 | os-tmpdir "^1.0.0" 565 | 566 | parse-filepath@^1.0.1: 567 | version "1.0.2" 568 | resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" 569 | integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= 570 | dependencies: 571 | is-absolute "^1.0.0" 572 | map-cache "^0.2.0" 573 | path-root "^0.1.1" 574 | 575 | parse-passwd@^1.0.0: 576 | version "1.0.0" 577 | resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" 578 | integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= 579 | 580 | path-is-absolute@^1.0.0: 581 | version "1.0.1" 582 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 583 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 584 | 585 | path-parse@^1.0.7: 586 | version "1.0.7" 587 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" 588 | integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== 589 | 590 | path-root-regex@^0.1.0: 591 | version "0.1.2" 592 | resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" 593 | integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= 594 | 595 | path-root@^0.1.1: 596 | version "0.1.1" 597 | resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" 598 | integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= 599 | dependencies: 600 | path-root-regex "^0.1.0" 601 | 602 | picomatch@^2.3.1: 603 | version "2.3.1" 604 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" 605 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== 606 | 607 | rechoir@^0.7.0: 608 | version "0.7.1" 609 | resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" 610 | integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== 611 | dependencies: 612 | resolve "^1.9.0" 613 | 614 | resolve-dir@^1.0.0, resolve-dir@^1.0.1: 615 | version "1.0.1" 616 | resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" 617 | integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= 618 | dependencies: 619 | expand-tilde "^2.0.0" 620 | global-modules "^1.0.0" 621 | 622 | resolve@^1.19.0, resolve@^1.9.0: 623 | version "1.22.2" 624 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" 625 | integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== 626 | dependencies: 627 | is-core-module "^2.11.0" 628 | path-parse "^1.0.7" 629 | supports-preserve-symlinks-flag "^1.0.0" 630 | 631 | "safer-buffer@>= 2.1.2 < 3.0.0": 632 | version "2.1.2" 633 | resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" 634 | integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== 635 | 636 | sprintf-js@^1.0.3: 637 | version "1.1.2" 638 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" 639 | integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== 640 | 641 | sprintf-js@~1.0.2: 642 | version "1.0.3" 643 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 644 | integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= 645 | 646 | supports-color@^7.1.0: 647 | version "7.2.0" 648 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" 649 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== 650 | dependencies: 651 | has-flag "^4.0.0" 652 | 653 | supports-preserve-symlinks-flag@^1.0.0: 654 | version "1.0.0" 655 | resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" 656 | integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== 657 | 658 | syntax-error@^1.4.0: 659 | version "1.4.0" 660 | resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c" 661 | integrity sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w== 662 | dependencies: 663 | acorn-node "^1.2.0" 664 | 665 | to-regex-range@^5.0.1: 666 | version "5.0.1" 667 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 668 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 669 | dependencies: 670 | is-number "^7.0.0" 671 | 672 | unc-path-regex@^0.1.2: 673 | version "0.1.2" 674 | resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" 675 | integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= 676 | 677 | underscore.string@~3.3.5: 678 | version "3.3.5" 679 | resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.5.tgz#fc2ad255b8bd309e239cbc5816fd23a9b7ea4023" 680 | integrity sha512-g+dpmgn+XBneLmXXo+sGlW5xQEt4ErkS3mgeN2GFbremYeMBSJKr9Wf2KJplQVaiPY/f7FN6atosWYNm9ovrYg== 681 | dependencies: 682 | sprintf-js "^1.0.3" 683 | util-deprecate "^1.0.2" 684 | 685 | util-deprecate@^1.0.2: 686 | version "1.0.2" 687 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 688 | integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= 689 | 690 | v8flags@~3.2.0: 691 | version "3.2.0" 692 | resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656" 693 | integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg== 694 | dependencies: 695 | homedir-polyfill "^1.0.1" 696 | 697 | which@^1.2.14: 698 | version "1.3.1" 699 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" 700 | integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== 701 | dependencies: 702 | isexe "^2.0.0" 703 | 704 | which@~2.0.2: 705 | version "2.0.2" 706 | resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 707 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 708 | dependencies: 709 | isexe "^2.0.0" 710 | 711 | wrappy@1: 712 | version "1.0.2" 713 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 714 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 715 | 716 | xtend@^4.0.2: 717 | version "4.0.2" 718 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" 719 | integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== 720 | -------------------------------------------------------------------------------- /whutbbcode.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @id WhutBBCode 3 | // @name WhutBBCode? 4 | // @namespace hateradio))) 5 | // @author hateradio 6 | // @version 8.5 7 | // @description This is a cross-browser BBCode helper. It works with Gazelle and other sites . . . CDs and waffles, mmm. 8 | // @homepageURL https://greasyfork.org/en/scripts/1024-whutbbcode 9 | // @icon data:image/png;base64,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 10 | // @screenshot https://raw.githubusercontent.com/hateradio/wbb/master/screenshot.png 11 | // @grant GM_Log 12 | 13 | // Not Gazelles 14 | 15 | // @include http*://*waffles.ch/forum/* 16 | // @include http*://*waffles.ch/details.php* 17 | // @include http*://*waffles.ch/my.php* 18 | // @include http*://*waffles.ch/bbcode.php* 19 | // @include http*://*waffles.ch/forums.php* 20 | // @include http*://*waffles.ch/upload.php* 21 | 22 | // @include http*://*cinemageddon.net/* 23 | // @include http*://*myanonamouse.net/* 24 | // @include http*://*torrentday.com/* 25 | 26 | // Beautiful Gazelles 27 | 28 | // @include http*://*redacted.sh/* 29 | // @include http*://*gazellegames.net/* 30 | // @include http*://*orpheus.network/* 31 | // @include http*://*indietorrents.com/* 32 | // @include http*://*brokenstones.club/* 33 | // @include http*://*bs.lunartype.com/* 34 | // @include http*://*alpharatio.cc/* 35 | // @include http*://*secret-cinema.pw/* 36 | // @include http*://*broadcasthe.net/* 37 | 38 | 39 | // RIP :( 40 | 41 | // @include http*://*what.cd/* 42 | 43 | // !update Nov 24 2024 44 | // !since Sep 30 2010 45 | // 2010+, hateradio 46 | // Please don't modify or edit my script and re-release it. D: 47 | // Send me a message if you want something modified. 48 | // Bug? Fix? Submit an Issue or Pull Request | https://github.com/hateradio/wbb 49 | 50 | // ==/UserScript== 51 | 52 | /** 53 | ### Updates 54 | 55 | ##### 8.5 56 | 57 | * +https 58 | 59 | #### 8.4 60 | 61 | * -.ch . . . +.sh 62 | 63 | #### 8.3.1 64 | 65 | * SVG icon fix 66 | 67 | #### 8.3 68 | 69 | * Adds dark theme support 70 | 71 | #### 8.2 72 | 73 | * Replace className and set/getAttribute with classList and dataset 74 | * Fix a margin issue for some stylesheets 75 | 76 | #### 8.1.1 77 | 78 | * Add support for torrentday.com, passthepopcorn.me, myanonamouse.net, broadcasthe.net 79 | 80 | #### 8.1 81 | 82 | * Enhancement: Edit button now re-creates the WhutBBCode instance instead of overwriting it 83 | 84 | #### 8 85 | 86 | * New Bootstrap icons 87 | * New button layouts 88 | * New button text (for option with no icons) 89 | * Use icon names from Bootstrap 90 | * New blueprint for orph 91 | 92 | #### 7 93 | 94 | * removes IE code 95 | * fixes icons for `[hr]` and `[pad]` 96 | 97 | #### 6.6 98 | 99 | * replaces `keypress` with `keydown` in Firefox 100 | 101 | #### 6.5 102 | 103 | * fixes preview in inbox 104 | * adds `hr` button 105 | 106 | #### 6 107 | 108 | * removes apl, adds orph 109 | 110 | #### 5.3 111 | * adds new BB code tags for RED (`[pad]`, `[php]`) 112 | * adds a line break before list item tags 113 | * makes sure to only add unique emoticons 114 | 115 | #### 5.2 116 | * changes JSON version from string to int 117 | 118 | #### 5.1.1 119 | * checks that site configuration exists 120 | * adds grunt and node package files 121 | 122 | #### 5.1 123 | 124 | * removes unnecessary site configurations 125 | 126 | #### 5 127 | 128 | * simplifies Gazelle site inclusion, only requires to use @include 129 | 130 | // #Updates 131 | */ 132 | 133 | (function () { 134 | 'use strict'; 135 | 136 | // helpers 137 | var dom, strg, update; 138 | 139 | // S T O R A G E HANDLE 140 | strg = { 141 | on: (function () { try { var a, b = localStorage, c = Math.random().toString(16).substr(2, 8); b.setItem(c, c); a = b.getItem(c); return a === c ? !b.removeItem(c) : false; } catch (e) { return false; } }()), 142 | read: function (key) { return this.on ? JSON.parse(localStorage.getItem(key)) : false; }, 143 | save: function (key, dat) { return this.on ? !localStorage.setItem(key, JSON.stringify(dat)) : false; }, 144 | wipe: function (key) { return this.on ? !localStorage.removeItem(key) : false; }, 145 | zero: function (o) { var k; for (k in o) { if (o.hasOwnProperty(k)) { return false; } } return true; }, 146 | grab: function (key, def) { var s = strg.read(key); return strg.zero(s) ? def : s; } 147 | }; 148 | 149 | // M I S C HANDLE 150 | dom = { 151 | // a simple list iterator function for arrays, nodelists, etc 152 | aEach: function (list, cb, scope) { var i, j = list.length; for (i = 0; i < j; i++) { if (cb.call(scope, list[i], i, list) === false) { break; } } }, 153 | // a simple object-type iterator | todo reverse cb order 154 | oEach: function (object, cb, scope) { var key; for (key in object) { if (object.hasOwnProperty(key)) { if (cb.call(scope, key, object[key], object) === false) { break; } } } }, 155 | dom: function (name, attr, child, parent) { 156 | // dom element creator 157 | // attr is an object of attributes to apply 158 | // a child node to attach to this element 159 | // a parent node for this element 160 | var e = document.createElement(name); 161 | if (attr.txt) { 162 | e.appendChild(document.createTextNode(attr.txt)); 163 | delete attr.txt; 164 | } 165 | dom.oEach(attr, function (key, data) { 166 | if (typeof data === 'object') { 167 | dom.oEach(data, function (name, value) { 168 | if (key === 'attr') { 169 | e.setAttribute(name, value); 170 | } else { 171 | e[key][name] = value; 172 | } 173 | }); 174 | } else { 175 | e[key] = data; 176 | } 177 | }); 178 | if (child) { e.appendChild(child); } 179 | if (parent) { parent.appendChild(e); } 180 | return e; 181 | }, 182 | click: function (el) { 183 | try { 184 | return !el.click(); 185 | } catch (err) { 186 | var e = document.createEvent('MouseEvents'); 187 | e.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); 188 | return el && !el.dispatchEvent(e); 189 | } 190 | }, 191 | css: function (t) { 192 | if (!this.style) { 193 | this.style = document.createElement('style'); 194 | this.style.type = 'text/css'; 195 | document.head.appendChild(this.style); 196 | } 197 | this.style.appendChild(document.createTextNode(t + '\n')); 198 | }, 199 | js: function (t) { 200 | var j = document.createElement('script'); 201 | j.type = 'text/javascript'; 202 | j[/^https?\:\/\//i.test(t) ? 'src' : 'textContent'] = t; 203 | document.head.appendChild(j); 204 | }, 205 | svg: function (path) { 206 | var svg = '' + path + ''; 207 | var base64 = window.btoa(svg); 208 | // return 'url(data:image/svg+xml;utf8,' + svg + ')'; 209 | return "url(data:image/svg+xml;base64," + base64 + ")"; 210 | } 211 | }; 212 | 213 | // U P D A T E HANDLE 214 | update = { 215 | name: 'WhutBBCode?', 216 | version: 8500, 217 | key: 'ujs_WBB_UPDT_HR', 218 | urij: 'https://hateradio.github.io/wbb/wbb.json', 219 | page: 'https://greasyfork.org/en/scripts/1024-whutbbcode', 220 | interval: 5, 221 | day: (new Date()).getTime(), 222 | time: function () { return new Date(this.day + (1000 * 60 * 60 * 24 * this.interval)).getTime(); }, 223 | notification: function (j) { 224 | if (this.version < j.version) { 225 | strg.save(this.key, { date: this.time(), version: j.version, page: j.page }); 226 | this.link(); 227 | } 228 | }, 229 | link: function () { 230 | this.csstxt(); 231 | 232 | var a = document.createElement('a'), b = strg.read(this.key); 233 | a.href = b.page || this.page; 234 | a.id = 'userscriptupdater2'; 235 | a.title = 'Update now.'; 236 | a.target = '_blank'; 237 | a.textContent = 'An update for ' + this.name + ' is available.'; 238 | a.addEventListener('click', function () { this.style.display = 'none'; }, false); 239 | document.body.appendChild(a); 240 | }, 241 | xhr: function () { 242 | var x = new XMLHttpRequest(); 243 | x.addEventListener('load', function () { update.notification(JSON.parse(this.responseText)); }, false); 244 | x.open('get', update.urij, true); 245 | x.send(); 246 | }, 247 | check: function (opt) { 248 | if (!strg.on) { return; } 249 | if (window.chrome && window.chrome.extension) { return; } 250 | var stored = strg.read(this.key), page; 251 | 252 | if (opt || !stored || stored.date < this.day) { 253 | page = (stored && stored.page) || this.page; 254 | strg.save(this.key, {date: this.time(), version: this.version, page: page}); 255 | this.xhr(); 256 | } else if (this.version < stored.version) { 257 | this.link(); 258 | } 259 | }, 260 | csstxt: function () { 261 | if (!this.pop) { this.pop = true; dom.css('#userscriptupdater2,#userscriptupdater2:visited{box-shadow:1px 1px 6px #7776;border-bottom:3px solid #d65e55;cursor:pointer;color:#555;font-family:sans-serif;font-size:12px;font-weight:700;text-align:justify;position:fixed;z-index:999999;right:10px;top:10px;background:#ebebeb url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTguODQ4NTMgMTk5LjM4MzA3Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNC4yNzYgLTE2LjM2NykiPjxjaXJjbGUgY3g9IjEwNC4zMjEiIGN5PSIxMTYuMzI3IiByPSI5OC4yNzQiIGZpbGw9IiNkNjVlNTUiLz48cGF0aCBmaWxsPSIjZTljZTAyIiBzdHJva2U9IiNlOWM4MDIiIHN0cm9rZS13aWR0aD0iMTYuNyIgZD0iTTE2Ni40NSAxNTcuMzEySDQxLjg5bDMxLjE0LTUzLjkzNSAzMS4xNC01My45MzUgMzEuMTM3IDUzLjkzNXoiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48dGV4dCB4PSI4NS42NDMiIHk9IjE1MS44NjYiIGZpbGw9IiNkNjVlNTUiIHN0cm9rZS13aWR0aD0iMS40NzciIHN0eWxlPSJsaW5lLWhlaWdodDoxLjI1Oy1pbmtzY2FwZS1mb250LXNwZWNpZmljYXRpb246J0Jvb2sgQW50aXF1YSciIGZvbnQtd2VpZ2h0PSI0MDAiIGZvbnQtc2l6ZT0iNTkuMDg4IiBmb250LWZhbWlseT0iQm9vayBBbnRpcXVhIiBsZXR0ZXItc3BhY2luZz0iMCIgd29yZC1zcGFjaW5nPSIwIj48dHNwYW4geD0iODUuNjQzIiB5PSIxNTEuODY2IiBzdHlsZT0iLWlua3NjYXBlLWZvbnQtc3BlY2lmaWNhdGlvbjonQm9vayBBbnRpcXVhJyIgZm9udC13ZWlnaHQ9IjcwMCIgZm9udC1zaXplPSIxMjYuMDU0Ij4hPC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==) no-repeat 10px center;background-size:40px;padding:0 20px 0 60px;height:55px;line-height:55px}#userscriptupdater2:hover,#userscriptupdater2:visited:hover{color:#b33a3a !important;border-color:#ce4b30}'); } 262 | } 263 | }; 264 | update.check(); 265 | 266 | /** 267 | * WhutBB Class 268 | * The principal class should not be used directly, 269 | * use WhutBB.create() instead 270 | * 271 | * Uses a textarea as a reference to attach elements and events 272 | * 273 | * @param textarea to use 274 | * @param id to place on the textarea 275 | */ 276 | function WhutBB(textarea, id) { 277 | this.textarea = textarea; 278 | this.textarea.classList.add('wbbarea'); 279 | this.textarea.dataset.wbb = id; 280 | this.id = id; 281 | this.wrap = dom.dom('div', { className: 'wbbcode ' + WhutBB.$.getWrapClass() }); 282 | 283 | WhutBB.Panel.copyTo(this); 284 | this.buttonList = this.makeButtonList(); 285 | 286 | this.insert(WhutBB.config.beneath); 287 | this.events(); 288 | } 289 | 290 | window.WhutBB = WhutBB; 291 | 292 | WhutBB.mac = /(?:^mac)/i.test(navigator.platform); 293 | 294 | // Array.from(document.querySelectorAll('script')).filter(function (e) { return e.src.includes('global.js?v='); }).length > 0 295 | WhutBB.gazelle = document.querySelector('div#wrapper > div#content > div.thin'); 296 | WhutBB.gazelleBlacklist = /(?:\/logchecker)|(?:user.php\?action=notify)|(?:tools.php\?action=clear_cache)/i; 297 | 298 | WhutBB.set = {}; 299 | 300 | /** 301 | * The factory gets all textareas on the page and creates new WhutBB instances 302 | * for textareas that are not read-only or disabled 303 | */ 304 | WhutBB.factory = function () { 305 | dom.aEach(document.getElementsByTagName('textarea'), function (textarea) { 306 | if (!textarea.disabled && !textarea.readOnly) { 307 | WhutBB.create(textarea); 308 | } 309 | }); 310 | }; 311 | 312 | /** 313 | * Creates a WhutBBCode? instance for a textarea 314 | * Ignores textareas that contain the class noWhutBB 315 | * 316 | * Stores reference in WhutBB.set 317 | * 318 | * @param textarea to use 319 | * @param force forces the creation of a new instance 320 | */ 321 | WhutBB.create = function (textarea, force) { 322 | if (!WhutBB.$.ignore.test(textarea.getAttribute('class'))) { 323 | var id = WhutBB.id(textarea); 324 | if (!WhutBB.set[id] || force === true) { 325 | WhutBB.set[id] = new WhutBB(textarea, id); 326 | } 327 | return WhutBB.set[id]; 328 | } 329 | }; 330 | 331 | /** 332 | * Locates or returns a unique ID 333 | * @param textarea to use 334 | */ 335 | WhutBB.id = function (textarea) { 336 | var dat = textarea.dataset.wbb; 337 | if (dat && dat.length > 0) { 338 | return dat; 339 | } 340 | return Math.random().toString(32); 341 | }; 342 | 343 | /** 344 | * Inserts the buttons beneath or above a textarea 345 | */ 346 | WhutBB.prototype.insert = function (beneath) { 347 | var node = beneath ? this.textarea.nextSibling : this.textarea; 348 | this.textarea.parentNode.insertBefore(this.wrap, node); 349 | }; 350 | 351 | 352 | /** 353 | * @param {HTMLTextAreaElement} textarea Replace the current textarea 354 | */ 355 | WhutBB.prototype.update = function (textarea) { 356 | if (this.textarea.isEqualNode(textarea)) { 357 | return this.show(); 358 | } 359 | 360 | this.textarea.remove(); 361 | this.textarea = textarea; 362 | this.textarea.classList.add('wbbarea'); 363 | this.insert(WhutBB.config.beneath); 364 | 365 | // wouldn't need to do this if the textarea were within the wrap . . . 366 | this.textarea.addEventListener('keydown', WhutBB.evt.key.register(this), false); 367 | }; 368 | 369 | /** 370 | * Attaches event handlers 371 | */ 372 | WhutBB.prototype.events = function () { 373 | this.textarea.addEventListener('keydown', WhutBB.evt.key.register(this), false); 374 | this.wrap.addEventListener('click', WhutBB.evt.mouse.register(this), false); 375 | }; 376 | 377 | /** 378 | * Hides this instance's elements 379 | */ 380 | WhutBB.prototype.hide = function () { 381 | this.wrap.classList.add('wbbhide'); 382 | }; 383 | 384 | /** 385 | * Shows this instance's elements 386 | */ 387 | WhutBB.prototype.show = function () { 388 | this.wrap.classList.remove('wbbhide'); 389 | }; 390 | 391 | /** 392 | * Is the instance visible? 393 | */ 394 | WhutBB.prototype.isVisble = function () { 395 | return !this.wrap.classList.contains('wbbhide'); 396 | }; 397 | 398 | /** 399 | * Returns a button (if any) 400 | * @param name of the button to get 401 | */ 402 | WhutBB.prototype.getButton = function (name) { 403 | return this.buttonList[name]; 404 | }; 405 | 406 | /** 407 | * Builds a list of DOM buttons for referencing 408 | * Used for keyboard shortcuts 409 | */ 410 | WhutBB.prototype.makeButtonList = function () { 411 | var list = {}; 412 | dom.aEach(this.panels.button.getElementsByTagName('button'), function (el) { 413 | list[el.name] = el; 414 | }); 415 | return list; 416 | }; 417 | 418 | // WhutBB.$ is a collection of misc functions and storage 419 | // IMPORTANT: To add a new site, add a regular expression to the "web" array 420 | WhutBB.$ = { 421 | ignore: /(?:\b(?:noWhutBB)\b)/i, // Ignore textareas with a CSS class of "noWhutBB" 422 | web: [ 423 | [':test', /^$|^localhost$/], 424 | ['red', /(?:redacted)\.ch/], 425 | ['notwhatcd', /(?:notwhat)\.cd/], 426 | ['btn', /(?:broadcasthe)\.net/], 427 | ['gazellegames', /(?:gazellegames)\.net/], 428 | ['myanonamouse', /(?:myanonamouse)\.net/], 429 | ['orpheus', /(?:orpheus)\.network/], 430 | ['bs', /(?:bs\.lunartype)\.com/], 431 | ['waffles', /(?:waffles\.ch)/], 432 | ['indietorrents', /(?:indietorrents\.com)/], 433 | ['torrentday', /(?:torrentday\.com)/], 434 | // ['what', /(?:what)\.cd/] 435 | // /(?:(last)(?:fm)?\.fm)/, 436 | ], 437 | wrapClasses: [['wbbimgless', 'wbbimg'], ['wbblight', 'wbbdark']], // Toggles icons & theme on buttons 438 | getWrapClass: function () { 439 | return this.wrapClasses[0][Number(WhutBB.user.settings.icon)] + ' ' + this.wrapClasses[1][Number(WhutBB.user.settings.theme)]; 440 | }, 441 | svgCss: function () { 442 | return Object.keys(WhutBB.db.icons).map(function (icon) { 443 | var svg = dom.svg(WhutBB.db.icons[icon]); 444 | return `.wbbimg .wbb-icon.wbb-icon-${icon} { -webkit-mask-image: ${svg}; mask-image: ${svg}; }`; 445 | }).join(''); 446 | }, 447 | css: function () { 448 | var svgs = WhutBB.$.svgCss(); 449 | // console.log(svgs); 450 | return ' .wbbcode button::-moz-focus-inner{border:0;padding:0}.wbbcode div,.wbbcode ul{margin:.2em;padding:.1em}.wbbset li{display:inline;margin:2px}.wbbset label input{vertical-align:text-bottom}.wbbset li label input{margin:0 3px 0 0}.wbbcode{width:' + WhutBB.config.width + 'px !important;font-size:11px;font-family:Tahoma, sans-serif;margin:auto!important;padding:3px}.wbbcode div{text-align:center !important}.sidebar .wbbcode {width: 100% !important;}.wbbcode.wbb_noimg button{background-image:none}.wbbcode.wbbimg button span{text-indent:-100px;overflow:hidden;display:inline-block;width:16px;height:16px}.wbbcode.wbbimgless button span{margin:0;background:none}.wbbcode button.whutbbutton{float:none;overflow:hidden;background:#eee;color:#555;font-size:11px;font-family:Arial, sans-serif;font-weight:400;cursor:pointer;width:22px;height:21px;text-shadow:#fff 1px 1px 1px;border-top:1px solid #fff;border-left:1px solid #fff;border-right:1px solid #ccc;border-bottom:1px solid #ccc;-moz-border-radius:2px;border-radius:2px;-moz-transition-duration:.2s;-webkit-transition-duration:.2s;-o-transition:none;transition-duration:.2s;vertical-align:middle;margin:0 1px 3px;padding:1px}.wbbcode button:hover{background-color:#fff;color:#555;border-top:1px solid #eee;border-left:1px solid #eee;border-right:1px solid #bbb;border-bottom:1px solid #bbb}.wbbcode button:active span{margin:3px 0 0 1px}.wbblink{padding:2px 0}.wbbemot,.wbbset{overflow:auto;margin:auto}.wbbset{overflow:hidden}.wbbemot{max-height:150px;box-shadow:0 0 3px #777;padding:3px}.wbbemot img,.wbbemot div{cursor:pointer}div.wbbcode button.wbbpressed{background-color:#ddd;border-top:1px solid #aaa;border-left:1px solid #aaa;border-right:1px solid #eee;border-bottom:1px solid #eee}.wbbcon{color:#d06620;height:1em}textarea[id^=editbox]{max-height:400px;overflow:auto!important}.wbbarea{outline-color:#ADD8E6;max-height:500px!important;overflow:auto!important;display:block;margin:3px auto 6px}.wbbshortcut{overflow:hidden;text-align:center;color:#2F2F2F;margin:0;padding:0}.wbbshortcut li{background:#eee;border-top:1px solid #fff;border-left:1px solid #fff;border-right:1px solid #ccc;border-bottom:1px solid #ccc;border-radius:2px;display:inline-block;zoom:1;vertical-align:top;margin:3px;padding:1em .5em}* html .wbbshortcut li{display:inline}.wbbshortcut li.wbbnotes{width: 95%;height: auto;}.wbbshortcut li strong {font-weight:bold;border:1px solid #DEDEDE;padding:0 3px;background:#f3f3f3;border-radius:3px;}.wbb-key{display:block;margin: 0 0 4px;}.wbbhide,.hidden.wbbarea{display:none !important}.wbb-svg{height:16px;width:16px}' + svgs + `.wbbcode.wbbdark button.whutbbutton { 451 | background: #414148 !important; 452 | color: #d4d4d4; 453 | text-shadow: #282828 1px 1px 1px; 454 | border-top: 1px solid #565656; 455 | border-left: 1px solid #404040; 456 | border-right: 1px solid #444; 457 | border-bottom: 1px solid #414141; 458 | box-shadow: rgba(29, 29, 29, 0.3) 0px 0px 5px 0px, rgb(62, 62, 62) 0px 0px 3px 0px inset, rgb(68, 68, 68) 0px 1px 0px 0px inset; 459 | } 460 | 461 | .wbbcode.wbbimg.wbblight .wbb-icon { background: #333 } 462 | .wbbcode.wbbimg.wbbdark .wbb-icon { background: #d5d5d5 } 463 | 464 | 465 | `; 466 | }, 467 | detectSite: function () { 468 | var website = WhutBB.gazelle ? ':gazelle' : ':generic'; 469 | dom.aEach(this.web, function (site) { 470 | if (site[1].test(document.domain) && WhutBB.db.sites[site[0]]) { 471 | website = site[0]; 472 | return false; 473 | } 474 | }); 475 | return website; 476 | } 477 | }; 478 | 479 | /** 480 | * The WhutBBCode? initializer 481 | * 482 | * @param config, see WhutBB.Settings 483 | * 484 | * example: 485 | * 486 | * WhutBB.init({ 487 | * emoticonDir: 'https://ssl.what.cd/static/common/smileys/', 488 | * emoticons: WhutBB.db.emoticons.gazelle.slice(0, 4), 489 | * blueprint: [ 490 | * ['b', 'i', 'u', 's'], ['code'], 491 | * ['color', 'size'], ['*'], 492 | * ['url', 'img'], ['quote'], 493 | * ['erase'], ['emoticon', 'shortcut', 'settings'] 494 | * ] 495 | * }); 496 | * 497 | */ 498 | WhutBB.init = function (config) { 499 | if (WhutBB.gazelle && WhutBB.gazelleBlacklist.test(document.location.href)) { 500 | console.log('WhutBBCode?: Will not run in ' + RegExp.lastMatch + '!'); 501 | return; 502 | } 503 | 504 | WhutBB.config = new WhutBB.Settings(config || WhutBB.db.getSiteSettings(WhutBB.$.detectSite())); 505 | try { 506 | console.info('WhutBBCode? mode ' + WhutBB.config.name); 507 | console.log(WhutBB.config); 508 | } catch (e) {} 509 | 510 | WhutBB.user.load(); 511 | dom.css(WhutBB.$.css()); 512 | WhutBB.db.setupShortcutMap(); 513 | WhutBB.Panel.construct(); 514 | 515 | if (WhutBB.gazelle) { 516 | document.getElementById('content').addEventListener('click', WhutBB.evt.delegate.edit, false); 517 | if (document.getElementById('messageform')) { 518 | document.getElementById('messageform').addEventListener('click', WhutBB.evt.delegate.inbox); 519 | } 520 | 521 | if (document.getElementById('type')) { 522 | document.getElementById('type').addEventListener('change', WhutBB.evt.delegate.report); 523 | 524 | window.setTimeout(function () { 525 | WhutBB.factory(); 526 | return WhutBB.set[RegExp.lastParen].show(); 527 | }, 500); 528 | } 529 | } 530 | }; 531 | 532 | /** 533 | * Settings storage management 534 | * Uses localStorage to store a user's settings 535 | * 536 | * Sends an appropriate message when settings are saved or not 537 | * 538 | * All settings are stored in the options object. These are 539 | * also used in the Panel class, which generates check boxes per option. 540 | */ 541 | WhutBB.user = { 542 | message: [ 543 | 'Settings failed to save. D:', 544 | 'Settings saved. :D' 545 | ], 546 | options: { 547 | prompt: { 548 | txt: 'Prompts', 549 | title: 'Show browser prompts.', 550 | value: false 551 | }, 552 | icon: { 553 | txt: 'Icons', 554 | title: 'Show icons.', 555 | value: false 556 | }, 557 | theme: { 558 | txt: 'Dark Theme', 559 | title: 'Toggle light or dark theme', 560 | value: false, 561 | }, 562 | link: { 563 | txt: 'WhutBBCode? Link', 564 | title: 'Show WhutBBCode? link', 565 | value: true 566 | } 567 | }, 568 | load: function () { 569 | this.set(strg.grab('wbb3', this.defaults())); 570 | // console.log('load', this.settings); 571 | }, 572 | set: function (settings) { 573 | this.settings = this.validate(settings); 574 | }, 575 | save: function (settings) { 576 | WhutBB.Panel.message(this.message[Number(strg.save('wbb3', this.validate(settings)))]); 577 | return strg.on ? this.load() : this.set(settings); 578 | }, 579 | validate: function (settings) { // returns only valid settings that exist in options 580 | var valid = {}; 581 | dom.oEach(this.options, function (name) { 582 | valid[name] = !!settings[name]; 583 | }); 584 | return valid; 585 | }, 586 | defaults: function () { 587 | var defaults = {}; 588 | dom.oEach(this.options, function (name, options) { 589 | defaults[name] = options.value; 590 | }); 591 | return defaults; 592 | }, 593 | settings: {} 594 | }; 595 | 596 | /** 597 | * Psuedo-Database 598 | * Contains all sites, buttons, emoticons, shortcuts 599 | * 600 | * Shortcuts are sorted by modifier key (ctrl/alt/ctrl+alt) 601 | * Modifier properties (a single letter) should correspond to a keyboard key letter 602 | * and the value (text) to a button name (WhutBB.db.button[text]) 603 | * Don't use CTRL with W, T, N, O (Chromium/IE Bugs) 604 | * 605 | * Special Note: Meta key (such as that on a Mac) is aliased to CTRL, 606 | * pressing either key returns the same result 607 | * 608 | */ 609 | WhutBB.db = { 610 | sites: { 611 | ':default': function () { 612 | return { 613 | name: '', 614 | link: 'https://greasyfork.org/en/scripts/1024-whutbbcode', 615 | beneath: true, 616 | blueprint: [], 617 | width: 470, 618 | emoticonDir: '', 619 | emoticonMax: 39, 620 | emoticons: [['', '']], // null emoticon 621 | shortcuts: WhutBB.db.shortcuts 622 | }; 623 | }, 624 | ':generic': function () { 625 | return { 626 | emoticonDir: 'https://orpheus.network/static/common/smileys/', 627 | emoticons: WhutBB.db.emoticons.gazelle.slice(0, 4), 628 | blueprint: [ 629 | ['b', 'i', 'u', 's'], ['code'], 630 | ['color', 'size'], ['*'], 631 | ['url', 'img'], ['quote'], 632 | ['erase'], ['emoticon', 'shortcut', 'settings'] 633 | ] 634 | }; 635 | }, 636 | ':test': function () { // for tests 637 | return { 638 | emoticonDir: 'https://orpheus.network/static/common/smileys/', 639 | emoticons: WhutBB.db.emoticons.gazelle, 640 | blueprint: [ 641 | ['b', 'i', 'u', 's', 'code'], 642 | ['font', 'color', 'size'], 643 | ['heading', 'important'], 644 | ['align', 'left', 'center', 'right'], 645 | ['gz_left', 'gz_center', 'gz_right'], 646 | ['#', '*'], 647 | ['url', 'img'], 648 | ['quote'], 649 | ['pre', 'gz_src', 'php'], 650 | ['hide', 'spoiler', 'mature'], 651 | ['artist', 'user', 'wiki', 'torrent', 'search', 'gz_rule'], 652 | ['pl', 'collage', 'forum'], 653 | ['tex'], 654 | ['plain', 'hr', 'pad'], 655 | ['youtube'], 656 | ['table', 'tr', 'th', 'td'], 657 | ['emoticon', 'shortcut', 'settings'], 658 | ['erase'] 659 | ] 660 | }; 661 | }, 662 | ':gazelle': function () { 663 | return { 664 | emoticonDir: '/static/common/smileys/', 665 | emoticons: 'gazelle', 666 | blueprint: 'gazelle' 667 | }; 668 | }, 669 | ':markdown': function () { 670 | return {}; 671 | }, 672 | // Custom Site Rules 673 | red: function () { 674 | return { 675 | // width: 470, 676 | link: '/wiki.php?action=article&name=BBCode', 677 | emoticonDir: '/static/common/smileys/', 678 | emoticons: WhutBB.db.uniqueEmoticons(WhutBB.db.emoticons.gazelle.concat(WhutBB.db.emoticons.red)), 679 | blueprint: [ 680 | ['b', 'i', 'u', 's'], ['color', 'size'], 681 | ['heading', 'important'], ['gz_left', 'gz_center', 'gz_right'], 682 | ['#', '*'], ['url', 'img'], ['quote'], ['hide', 'mature'], 683 | ['artist', 'torrent', 'user', 'wiki', 'gz_rule'], ['pre', 'php', 'code', 'plain'], 684 | ['hr', 'pad'], ['tex'], 685 | [ 'erase'], ['emoticon', 'shortcut', 'settings'] 686 | ] 687 | }; 688 | }, 689 | what: function () { 690 | // rip 691 | return { 692 | link: '/wiki.php?action=article&name=BBCode', 693 | emoticonDir: 'https://what.cd/static/common/smileys/', 694 | emoticons: WhutBB.db.uniqueEmoticons(WhutBB.db.emoticons.gazelle.concat(WhutBB.db.emoticons.what)), 695 | blueprint: 'gazelle' 696 | }; 697 | }, 698 | notwhatcd: function () { 699 | return { 700 | emoticonDir: 'https://notwhat.cd/static/common/smileys/', 701 | emoticons: WhutBB.db.uniqueEmoticons(WhutBB.db.emoticons.gazelle.concat(WhutBB.db.emoticons.notwhatcd)), 702 | blueprint: 'gazelle' 703 | }; 704 | }, 705 | gazellegames: function () { 706 | return { 707 | emoticonDir: 'https://gazellegames.net/static/common/smileys/', 708 | emoticons: WhutBB.db.uniqueEmoticons(WhutBB.db.emoticons.gazelle.concat(WhutBB.db.emoticons.gazellegames)), 709 | width: 430, 710 | blueprint: 'gazelle' 711 | }; 712 | }, 713 | orpheus: function () { 714 | return { 715 | link: '/wiki.php?action=article&id=43', 716 | emoticonDir: '/static/common/smileys/', 717 | emoticons: WhutBB.db.uniqueEmoticons(WhutBB.db.emoticons.gazelle.concat(WhutBB.db.emoticons.orpheus)), 718 | blueprint: [ 719 | ['b', 'i', 'u', 's'], ['color', 'size'], 720 | ['heading', 'important'], ['gz_left', 'gz_center', 'gz_right'], 721 | ['#', '*'], ['url', 'img'], ['quote', 'hide', 'mature'], 722 | ['artist', 'torrent', 'pl', 'collage'], ['user', 'wiki', 'gz_rule'], 723 | ['pre', 'code', 'plain', 'tex'], 724 | [ 'erase'], ['emoticon', 'shortcut', 'settings'] 725 | ] 726 | }; 727 | }, 728 | bs: function () { 729 | return { 730 | emoticonDir: 'https://bs.lunartype.com/static/common/smileys/', 731 | emoticons: WhutBB.db.uniqueEmoticons(WhutBB.db.emoticons.gazelle.concat(WhutBB.db.emoticons.bs)), 732 | blueprint: 'gazelle' 733 | }; 734 | }, 735 | indietorrents: function () { 736 | return { 737 | link: '/wiki.php?action=article&id=3', 738 | emoticonDir: '/static/common/smileys/', 739 | emoticons: 'indie', 740 | width: 440, 741 | blueprint: [ 742 | ['b', 'i', 'u', 's'], ['color', 'size'], 743 | ['gz_left', 'gz_center', 'gz_right'], ['*'], ['url', 'img', 'youtube'], 744 | ['quote', 'pre', 'gz_src', 'hide'], ['table', 'tr', 'th', 'td'], 745 | ['artist', 'user', 'wiki'], ['tex', 'plain'], 746 | ['erase'], ['emoticon', 'shortcut', 'settings'] 747 | ] 748 | }; 749 | }, 750 | waffles: function () { 751 | WhutBB.db.buttons.raw = WhutBB.db.buttons.plain; 752 | 753 | return { 754 | link: '/bbcode.php', 755 | emoticonDir: 'https://d17wj6ajhy2qee.cloudfront.net/assets/images/smilies/', 756 | emoticons: 'waffles', 757 | beneath: false, 758 | width: 540, 759 | blueprint: [ 760 | ['b', 'i', 'u', 's'], ['size', 'color', 'font', 'spoiler'], 761 | ['*'], ['url', 'img', 'youtube'], 762 | ['center', 'quote', 'pre', 'raw'], 763 | ['artist', 'user', 'torrent', 'search'], 764 | ['erase'], ['emoticon', 'shortcut', 'settings'] 765 | ] 766 | }; 767 | }, 768 | }, // icons (c) Bootstrap https://icons.getbootstrap.com/ 769 | icons: { 770 | typeBold: '', 771 | typeItalic: '', 772 | typeUnderline: ' ', 773 | typeStrikethrough: ' ', 774 | code: '', 775 | flag: ' ', 776 | dropletHalf: ' ', 777 | textareaT: ' ', 778 | justify: '', 779 | textLeft: '', 780 | textCenter: '', 781 | textRight: '', 782 | listOl: ' ', 783 | listUl: '', 784 | link45deg: ' ', 785 | image: ' ', 786 | chatSquareQuote: ' ', 787 | braces: '', 788 | eye: ' ', 789 | exclamationDiamond: ' ', 790 | shieldLock: ' ', 791 | musicPlayer: ' ', 792 | personSquare: ' ', 793 | download: ' ', 794 | cloudDownload: ' ', 795 | basket: ' ', 796 | bookHalf: ' ', 797 | bookmarks: ' ', 798 | fonts: '', 799 | x: ' ', 800 | hr: ' ', 801 | film: '', 802 | type: '', 803 | search: ' ', 804 | table: '', 805 | gripVertical: '', 806 | grid: '', 807 | gridFill: '', 808 | typeH2: '', 809 | codeSlash: '', 810 | arrowsExpand: ' ', 811 | infoSquare: ' ', 812 | emojiSunglasses: ' ', 813 | toggles: '', 814 | command: ' ', 815 | trash: ' ' 816 | }, 817 | buttons: { 818 | b: {title: 'Bold', icon: 'typeBold'}, 819 | i: {title: 'Italic', icon: 'typeItalic'}, 820 | u: {title: 'Underline', icon: 'typeUnderline'}, 821 | s: {title: 'Strike', icon: 'typeStrikethrough'}, 822 | code: {display: 'c', title: 'Inline Code', icon: 'code'}, 823 | important: {display: '!', title: 'Important', icon: 'flag'}, 824 | color: {type: 1, display: '\u25ee', prompt: 'Enter a #hexadecimal or color name.', title: 'Color', val: '#', icon: 'dropletHalf'}, 825 | size: {type: 1, display: '\u00b1', prompt: 'Enter a number.', title: 'Size', val: 3, icon: 'textareaT'}, 826 | align: {type: 1, display: '\u2261', prompt: 'Enter alignment: left, right, center', title: 'Align', icon: 'justify'}, 827 | left: {display: '<', title: 'Left', icon: 'textLeft'}, 828 | center: {display: '\u2013', title: 'Center', icon: 'textCenter'}, 829 | right: {display: '>', title: 'Right', icon: 'textRight'}, 830 | '#': {type: 3, title: 'Ordered List Item', icon: 'listOl'}, 831 | '*': {type: 3, display: '\u2731', title: 'List Item', icon: 'listUl'}, 832 | url: {type: 1, prompt: 'Enter a Link', title: 'Link', val: 'https://', icon: 'link45deg'}, 833 | img: {title: 'Image', icon: 'image'}, 834 | quote: {type: 1, display: 'q', prompt: 'Enter an author or name', title: 'Quote', placeholder: 'author', icon: 'chatSquareQuote'}, 835 | pre: {title: 'Preformatted (Terminal)', icon: 'braces'}, 836 | hide: {display: 'h', title: 'Hide', icon: 'eye'}, 837 | spoiler: {display: '_', title: 'Spoiler', icon: 'exclamationDiamond'}, 838 | mature: {type: 1, display: 'm', prompt: 'Enter a description', title: 'Mature Content', val: 'xXx', icon: 'shieldLock'}, 839 | artist: {display: 'a', title: 'Artist', icon: 'musicPlayer'}, 840 | user: {display: '@', title: 'User', icon: 'personSquare'}, 841 | torrent: {display: 'id', title: 'Torrent', icon: 'download'}, 842 | pl: {display: 'pl', title: 'Torrents', icon: 'cloudDownload'}, 843 | collage: {display: 'clg', title: 'Collage', icon: 'basket'}, 844 | forum: {display: 'f', title: 'Forum', icon: 'bookHalf'}, 845 | wiki: {type: 4, tag: ['[[', ']]'], display: 'w', title: 'Wiki Article', icon: 'bookmarks'}, 846 | tex: {display: 't', title: 'LaTeX', icon: 'fonts'}, 847 | plain: {display: '\u00D7 ', title: 'Disable BBCode', icon: 'x'}, 848 | hr: {type: 5, display: '\u2015', title: 'Horizontal Rule', icon: 'hr'}, 849 | youtube: {type: 2, display: 'yt', title: 'YouTube', icon: 'film'}, 850 | font: {type: 1, display: 'f', prompt: 'Enter a font\'s name', title: 'Font', val: 'Arial', icon: 'type'}, 851 | search: {type: 1, display: '%', prompt: 'Enter a search term', title: 'Search Term', val: 'keywords', icon: 'search'}, 852 | table: {display: 'tbl', title: 'Table', icon: 'table'}, 853 | th: {display: 'th', title: 'Table Heading', icon: 'gripVertical'}, 854 | tr: {display: 'tr', title: 'Table Row', icon: 'grid'}, 855 | td: {display: 'td', title: 'Table Cell', icon: 'gridFill'}, 856 | heading: {type: 4, tag: '=', display: '=', title: 'Heading', icon: 'typeH2'}, 857 | php: {display: ' 10|0|10|0)', prompt: 'Enter a padding. Eg, top|right|bottom|left --> 10|0|10|0', val: '0|0|0|0', icon: 'arrowsExpand'}, 859 | // Gazelle 860 | gz_left: {tag: 'align', val: 'left', type: 1, noPrompt: true, display: '<', title: 'Left', icon: 'textLeft'}, 861 | gz_center: {tag: 'align', val: 'center', type: 1, noPrompt: true, display: '\u2013', title: 'Center', icon: 'textCenter'}, 862 | gz_right: {tag: 'align', val: 'right', type: 1, noPrompt: true, display: '>', title: 'Right', icon: 'textRight'}, 863 | gz_src: {macro: ['quote', 'pre'], type: -3, display: '', title: 'Source Code', icon: 'codeSlash'}, 864 | gz_rule: {tag: 'rule', title: 'Rule', icon: 'infoSquare', display: 'r' }, 865 | // Panels 866 | emoticon: {display: ':]', toggle: ';]', title: 'Emoticons', type: -1, icon: 'emojiSunglasses'}, 867 | settings: {display: '\u205D', toggle: '\u2059', title: 'Settings', type: -1, icon: 'toggles'}, 868 | shortcut: {display: '?', toggle: '\u203D', title: 'Shortcuts', type: -1, icon: 'command'}, 869 | erase: {display: '-', title: 'Delete Message', type: -2, icon: 'trash'} 870 | }, 871 | emoticons: { 872 | // for gazelle-based sites make sure to filter any overlapping emoticons 873 | // use WhutBB.db.emoticons.gazelle.concat(WhutBB.db.emoticons.SOME_SITE) to cobine them 874 | gazelle: [[":angry:", "angry.gif"], [":D", "biggrin.gif"], [":|", "blank.gif"], [":blush:", "blush.gif"], [":cool:", "cool.gif"], [":'(", "crying.gif"], [">.>", "eyesright.gif"], [":creepy:", "creepy.gif"], [":frown:", "frown.gif"], ["<3", "heart.gif"], [":unsure:", "hmm.gif"], [":whatlove:", "ilu.gif"], [":lol:", "laughing.gif"], [":loveflac:", "loveflac.gif"], [":ninja:", "ninja.gif"], [":no:", "no.gif"], [":nod:", "nod.gif"], [":ohno:", "ohnoes.gif"], [":omg:", "omg.gif"], [":o", "ohshit.gif"], [":paddle:", "paddle.gif"], [":(", "sad.gif"], [":shifty:", "shifty.gif"], [":sick:", "sick.gif"], [":)", "smile.gif"], [":-)", "smile.gif"], [":sorry:", "sorry.gif"], [":thanks:", "thanks.gif"], [":P", "tongue.gif"], [":wave:", "wave.gif"], [":wink:", "wink.gif"], [":worried:", "worried.gif"], [":wtf:", "wtf.gif"], [":wub:", "wub.gif"]], 875 | gazellegames: [], 876 | orpheus: [], 877 | notwhatcd: [], 878 | red: [], 879 | bs: [], 880 | waffles: [[':waffleslove:', 'wubwaffles-2521f27a7566ee5cc069a3de14186bfd.gif'], [':opplove:', 'opplove-a8ccb8f7a9eac53ea93b79aefdcbbce2.gif'], [':-)', 'smile1-560658ee5e07e8ecaa3a08b2a1863c11.gif'], [':smile:', 'smile2-253a5659d9f881d0bebe9bc0b55651c6.gif'], [':-D', 'grin-4e432d4da3dacfc18d6b1efab45f109b.gif'], [':lol:', 'laugh-a1fab5d7a0444f1592f11b6300e8c735.gif'], [':w00t:', 'w00t-6d03c966b18c52fe27b8e71f4b5d0884.gif'], [':think:', 'think-ea7a2b4427bc8647d2482d56725feb55.gif'], [':-P', 'tongue-38d0b91dc1ff41a30c60cbfaf5c2a44d.gif'], [';-)', 'wink-89f2684eef38e562f10702689dac26de.gif'], [':-|', 'noexpression-4830284942db4804edd00add175bd878.gif'], [':-/', 'confused-b19136e38d02f3856fb8ada4c607c32d.gif'], [':-(', 'sad-99cbd04577892ef40541a94d426fb3da.gif'], [':cry:', 'cry-0c6e60c96c57cd04f537c064e0bcd2f9.gif'], [':crybaby:', 'crybaby-48ffb0fafe08c7e4113290a65741a92f.gif'], [':weep:', 'weep-cab525eab9fd0ca42f57534256d15b9f.gif'], [':-O', 'ohmy-219a8910835d309918b3fd38e136f5d0.gif'], [':o)', 'clown-69f44277bd832326ae116e3a8d0bdefa.gif'], ['8-)', 'cool1-40699903f40da78055f73c7a4dcf80d3.gif'], ['|-)', 'sleeping-5b9787c310fe92ca1179efa8773d13bb.gif'], [':bite:', 'bite-7d0251d8ca504cb6d9c963ba48527778.gif'], [':innocent:', 'innocent-ebfd211a73e277dcb8bb9aebe413186c.gif'], [':whistle:', 'whistle-df262302a1e22fb3b81e3c8091dd8ae8.gif'], [':unsure:', 'unsure-4f4483b4a49a4a48eea53f6a1fe2fbbe.gif'], [':closedeyes:', 'closedeyes-88fed55a5dba73d12b7d3a46ce61f1a5.gif'], [':cool:', 'cool2-585a4b126cdef75cff806373c11a6d4f.gif'], [':fun:', 'fun-bcdec9a81cf9af50b3c0db3671632a18.gif'], [':thumbsup:', 'thumbsup-9123163fe00ddf80036ee71b494b387c.gif'], [':thumbsdown:', 'thumbsdown-fd785afa98ea443ea00d88244849ecd4.gif'], [':blush:', 'blush-7e580b085806fe42a81d319821942eee.gif'], [':yes:', 'yes-458318d3341e1b7b8706e5103c2babd8.gif'], [':no:', 'no-fc2c2bcae3506ea2d3e3d3dc1b60f344.gif'], [':love:', 'love-d87adbbe12875920098a39974db15a58.gif'], [':?:', 'question-2da82c0b17b82f0f90859e2c2abe956b.gif'], [':!:', 'excl-ffa5e74329d67f804c3e75cdce4d2ae2.gif'], [':idea:', 'idea-7414639bdb7eddf4caea80ed3ba5d4d4.gif'], [':arrow:', 'arrow-ecca9442544396e7bf5258b76d837234.gif'], [':arrow2:', 'arrow2-060bb04e31b7f2ca25e24d7ccd223403.gif'], [':hmm:', 'hmm-9bcee658025a5bdf25e3e5327f3480ea.gif'], [':hmmm:', 'hmmm-e7d0bfb876d6dfc665d0d26c313b105b.gif'], [':huh:', 'huh-40027207c6263888d7cb60b1a11da8d8.gif'], [':geek:', 'geek-391ef98eb0e54003c0cfaaefe5942439.gif'], [':look:', 'look-78d96bcf1f6fe9744ecbf4d5244536c5.gif'], [':rolleyes:', 'rolleyes-41a1a18f3b18b0772240d89c45df5269.gif'], [':kiss:', 'kiss-146a79fb9405272d4f42e99c8e5ffe63.gif'], [':shifty:', 'shifty-89e6633d5f65e865b740f0d86dfcfb5b.gif'], [':blink:', 'blink-b1ceeb6a6c7c795dd141a1f5abc407cc.gif'], [':smartass:', 'smartass-df4ddd1ce630a8b2b1b1d4a07bb51802.gif'], [':sick:', 'sick-c2118245556bc2d3bd41222e5d978831.gif'], [':crazy:', 'crazy-c01c4dc3ff4ee33b23084a1d2d908023.gif'], [':orly:', 'orly-10e48d1489ca1370b37cf004e0107922.gif'], [':wacko:', 'wacko-32608221a12351b6085b2a76cbbaf1b6.gif'], [':alien:', 'alien-4242ce616db4008baeb965751ffdbd6d.gif'], [':wizard:', 'wizard-9cdf13a144a6f27ca01f9a84c50920d8.gif'], [':wave:', 'wave-356ec60e5f19bac9eff3b498ebfc1302.gif'], [':wavecry:', 'wavecry-4d265e41f67e026ebc4ab217bead7d6d.gif'], [':baby:', 'baby-97427920507ee34dfcb3647732205334.gif'], [':angry:', 'angry-0b177f61464277696e0ea047300be941.gif'], [':ras:', 'ras-5e59f83e717b19e5e26157b806437483.gif'], [':sly:', 'sly-738f409e4047197bb6375b25c7ee7f5c.gif'], [':devil:', 'devil-e3f6d8c109d34b0a6c02df621d37eb6f.gif'], [':evil:', 'evil-1dcf0991650e337d0eddb0375c6673de.gif'], [':evilmad:', 'evilmad-8094521229f4019c25b73591ae4dc0c1.gif'], [':sneaky:', 'sneaky-f1b79d0f7204bbd63f9cf47537c64f14.gif'], [':axe:', 'axe-057fb27c78a80d9bb9f002b4a5b7bb5e.gif'], [':slap:', 'slap-927bb31ea2f24e9c62e934e3944cdb23.gif'], [':wall:', 'wall-2cb395672976b927b720c6d4870c4ab8.gif'], [':rant:', 'rant-592949953cea288aa52319fa6b4c8b94.gif'], [':jump:', 'jump-29047acc082f064e6ce0c298c0d86995.gif'], [':yucky:', 'yucky-cefb1203e739c431569304382f96e524.gif'], [':nugget:', 'nugget-6753bf5221ee7569de7a689851c941c3.gif'], [':smart:', 'smart-aeeac59afce3e6b3a29c15dab8a1d2db.gif'], [':shutup:', 'shutup-955bf0025595c5ee1e7e8b7ed3c8b451.gif'], [':shutup2:', 'shutup2-12b77059128e69ea02f2c83cd674c2d8.gif'], [':crockett:', 'crockett-f6f21951664e037350178ddc48e43cc7.gif'], [':zorro:', 'zorro-6ed3d91db57faf8f1c679a0104df3287.gif'], [':snap:', 'snap-abe3f319906de4ad2c911db2f8be0457.gif'], [':beer:', 'beer-8624578c14d53eb15fcb53ce1d92b624.gif'], [':beer2:', 'beer2-3ac8a709706edc3ec23640ae261a7d7b.gif'], [':drunk:', 'drunk-9f7e144e04f9b645a0664c19d971d187.gif'], [':strongbench:', 'strongbench-a31c4395e1497b99a65ef03d9001f0f5.gif'], [':weakbench:', 'weakbench-ae49b68c1a3aeb0338067600b027630e.gif'], [':dumbells:', 'dumbells-66c83d31692d9f891f7c4abd528ce34a.gif'], [':music:', 'music-8fdf83519a7784655553167651f5b906.gif'], [':stupid:', 'stupid-64c93342b79365e6253668c56061ae30.gif'], [':dots:', 'dots-76bd535228d09950e0469c1035085733.gif'], [':offtopic:', 'offtopic-dde3c44e1eab9e64e0a0342830ece5d8.gif'], [':spam:', 'spam-89dc0d0860bf67faaf638ae5d4af5522.gif'], [':oops:', 'oops-7b7c406acac8cb9556647124b47f65bf.gif'], [':lttd:', 'lttd-419bf447899d4bd0d12421508d6b182e.gif'], [':please:', 'please-b493794982b341bd165dc78e8da392ca.gif'], [':sorry:', 'sorry-296b4590f343aae1fbcdcaec26aa9d6b.gif'], [':hi:', 'hi-d43d6f4647b842c186e4751d5f8593fa.gif'], [':yay:', 'yay-f0142dc8b6b7480c2d3c2d63cb97fbe6.gif'], [':cake:', 'cake-09bb27b361ddc8f36af89cf5c416ded1.gif'], [':hbd:', 'hbd-c88a75dffd37270ca561f3e8fa2d4792.gif'], [':band:', 'band-05785c3ffa59700b2d4d392c6d055ac1.gif'], [':punk:', 'punk-9a668ff6c0d9aa86a5f224394dd69388.gif'], [':rofl:', 'rofl-f8b19634186288c71d057d5f573b0c08.gif'], [':bounce:', 'bounce-01e0269597d0977117516e453785165e.gif'], [':mbounce:', 'mbounce-5d299f4fb8e63d88f447616fe9c6a228.gif'], [':thankyou:', 'thankyou-756e056b129ff51bbb32f25a34cee551.gif'], [':gathering:', 'gathering-086469368ada9d89216831908d16b71a.gif'], [':hang:', 'hang-7eb55fd687c7da7963c65df6738d078f.gif'], [':chop:', 'chop-01d980e59de44860127351fb8c4378d5.gif'], [':rip:', 'rip-9f76c7e7f6406a88eb51f8f7e11bf8b5.gif'], [':whip:', 'whip-449fae3c143197dbe50d1e23aa06ba1b.gif'], [':judge:', 'judge-3b457cc503c6333eb9c617bb0aaf939b.gif'], [':chair:', 'chair-06dbccd541c32f5b8b78a00be533ea48.gif'], [':tease:', 'tease-14fac8acbb4aa7941e0a0a19c24468fd.gif'], [':box:', 'box-3f8587850b9ee5e73baa303dd7be817a.gif'], [':boxing:', 'boxing-863999b9867552a5c0b9a899bfeb8b2a.gif'], [':guns:', 'guns-ed7df8a2db38d6c5ffa99175ab4c28c1.gif'], [':shoot:', 'shoot-0615a7c3de81fec986a3e9c4517a16e9.gif'], [':shoot2:', 'shoot2-f6920a2710da65de365d3c22cd2ae542.gif'], [':flowers:', 'flowers-27332577023d64cfb727141fe5e4d14b.gif'], [':wub:', 'wub-0ad5e6feb5270036b984bceef2f003d8.gif'], [':lovers:', 'lovers-f5e6c32a84e8493a4158e5e433f93361.gif'], [':kissing:', 'kissing-0fe382763a16cf6c3c60d5b08db0f9b2.gif'], [':kissing2:', 'kissing2-ee32fc798de7cb2acd5559ce73178f61.gif'], [':console:', 'console-68b189b1dab66bf547027e563ecf0c15.gif'], [':group:', 'group-c9a1ec760a777981072d1ef32aa15c18.gif'], [':hump:', 'hump-272f1f79650b59ea69f923d9130ef69e.gif'], [':hooray:', 'hooray-6c652ce73716362393686b7c6ef0b440.gif'], [':happy2:', 'happy2-c62e525a319bb1f890915a7b9aab66b0.gif'], [':clap:', 'clap-04df3e4f3c7503db3eece534e0cfc222.gif'], [':clap2:', 'clap2-948072586f68c56b095cd882883a92b2.gif'], [':weirdo:', 'weirdo-272bef79cbd6b67841ee58a11a231748.gif'], [':yawn:', 'yawn-887032484c9d38e473984004bcfb065d.gif'], [':bow:', 'bow-e7bb9c96931ac0df88d1641e0e5f3851.gif'], [':dawgie:', 'dawgie-c67131b834f9bb2a9b30cee42b67987d.gif'], [':cylon:', 'cylon-5ea27fc2b0719f40d289f4c7b93f7ada.gif'], [':book:', 'book-be7f16f0671c0c559a4e2bd74c393b8c.gif'], [':fish:', 'fish-00be24fac4a017112d7804c3e897097f.gif'], [':mama:', 'mama-4dfb65772fb41f145a3f89ad37790a81.gif'], [':pepsi:', 'pepsi-7b4b1badd4396b3f4e22d6118e323f02.gif'], [':medieval:', 'medieval-50260f623bc633f0ecf74d7c17393ff1.gif'], [':rambo:', 'rambo-09d6efc427fb1e7e6340fbb147d43a11.gif'], [':ninja:', 'ninja-1df82da69d50dbd46d2cb359f8527419.gif'], [':hannibal:', 'hannibal-426ef9b9bcc9a3333c4ab26715492580.gif'], [':party:', 'party-66ad63e75a1828550d3486931a49f857.gif'], [':snorkle:', 'snorkle-3e5f5fd9bf0db02f1f33517717683970.gif'], [':evo:', 'evo-312ef9ba37feaf9f3467d4e8d46a663e.gif'], [':king:', 'king-81506071dd6ee2049ad6fa5a21a46157.gif'], [':chef:', 'chef-e5089f65672d3467fb6840fae5976929.gif'], [':mario:', 'mario-36b76b39c0c58e36b65a055a3ce54941.gif'], [':pope:', 'pope-fb424bc064d80fe7bc29341eddbab4c6.gif'], [':fez:', 'fez-7a0ebd6c8eea5c7e6020ceff77fca632.gif'], [':cap:', 'cap-4cbad47f6570262439eeba3137b6beb7.gif'], [':cowboy:', 'cowboy-2e6c4ed4565b3cdb7af6c52367f83fe5.gif'], [':pirate:', 'pirate-0c35d70ab51a83113a8f111476da6f5e.gif'], [':pirate2:', 'pirate2-a0a401392f51e48eb66831ebbe67df53.gif'], [':rock:', 'rock-40548e8d132ae530802a14d89c2d760b.gif'], [':cigar:', 'cigar-676427cb7a3bbbea4303015d3d2acfdc.gif'], [':icecream:', 'icecream-032618e68cfae2cc8ae02b0fa3704e05.gif'], [':oldtimer:', 'oldtimer-757ffdf57d44a55ca1f72c96f09fd1b0.gif'], [':trampoline:', 'trampoline-2ba70f11043de1ef9010fc75cd29afb8.gif'], [':banana:', 'bananadance-3f9ed835b302b721ff8c82ade10459a0.gif'], [':smurf:', 'smurf-fdbbd6f4b8d709620293c49bd844febb.gif'], [':yikes:', 'yikes-0200f0559a21414f04632172f77fa99d.gif'], [':osama:', 'osama-d01f5ee7a14b25177bfd60b30d438a3f.gif'], [':saddam:', 'saddam-27b72ffd9b4d13aaa00e03567b40eea4.gif'], [':santa:', 'santa-7c385ec9c2718f9f01633dfd9a56b0b6.gif'], [':indian:', 'indian-fb42d05ff92de4d57b123e945e951244.gif'], [':pimp:', 'pimp-d0a709339d63c555d57ed7bca0c00ddb.gif'], [':nuke:', 'nuke-2f73939082f53cb445bf9e166108143d.gif'], [':jacko:', 'jacko-cfc99a11372c2eba9367932d7df360f0.gif'], [':ike:', 'ike-1992ee857800281bac157d4866d8385b.gif'], [':greedy:', 'greedy-4a04cd5db2356e54c750fe6f9f2ab93b.gif'], [':super:', 'super-19790574533d71b475ac60bc88be05fa.gif'], [':wolverine:', 'wolverine-054e82e4a90dd2874ac1dcbf773d8bdf.gif'], [':spidey:', 'spidey-7ef425b6d02a12067936229c04b821f0.gif'], [':spider:', 'spider-fac295e77895de28902d26ebc14344ca.gif'], [':bandana:', 'bandana-764003ef9751eca0f70b3f6b6668c533.gif'], [':construction:', 'construction-ec7857a9ee8ba8e7ef236cf749401194.gif'], [':sheep:', 'sheep-c8e7ce684732354235f91284927ae812.gif'], [':police:', 'police-e02b59b0fb153ad7d7314edf7b985c39.gif'], [':detective:', 'detective-4c526178c97055d4851c212e6e5d8c7c.gif'], [':bike:', 'bike-773e389449eedf0719cf6352ac9d0a85.gif'], [':fishing:', 'fishing-0d961d64c39a324a62bd6ff276200f61.gif'], [':clover:', 'clover-67a8ff1eddedfe1a2cd3c8e8cd9b9ef2.gif'], [':horse:', 'horse-ff20edcdc92f16cfc1565d38aa8ad7da.gif'], [':shit:', 'shit-90a3b56537435867cb120a4d85984704.gif'], [':soldiers:', 'soldiers-012a263073b602c268ecfae69672e1f5.gif'], [':search:', 'search-7d7bd7365acc3edb2e050b85cc4180fd.gif'], [':tinfoilhat:', 'tinfoilhat-4bf3badd9c9afbb1b0a9f2e0a92097f2.gif'], [':moon1:', 'moon1-7f51ab8d5699c8398083985aa34ff1b8.gif'], [':moon2:', 'moon2-967c0e89b8e8ab2393c23cf9dd763a22.gif'], [':user:', 'user-cadad12a1f12dae826bf1dcfbfa29db1.gif'], [':staff:', 'staff-f6921aa4cb3d0960eac347ba772f5ce2.gif']], /*, [':box:', 'box.gif']*/ 881 | indie: [[':-)', 'smile.gif'], [';-)', 'wink.gif'], [':-D', 'biggrin.gif'], [':-P', 'tongue.gif'], [':-(', 'sad.gif'], ['>:-|', 'blank.gif'], [':-/', 'confused.gif'], [':-O', 'ohmy.gif'], [':o)', 'clown.gif'], ['8-)', 'cool1.gif'], ['|-)', 'sleeping.gif'], [':cupcake:', 'cupcake1.gif'], [':innocent:', 'innocent.gif'], [':whistle:', 'whistle.gif'], [':unsure:', 'hmm.gif'], [':closedeyes:', 'closedeyes.gif'], [':angry:', 'angry.gif'], [':smile:', 'smile2.gif'], [':lol:', 'laughing.gif'], [':cool:', 'cool.gif'], [':fun:', 'fun.gif'], [':thumbsup:', 'thumbsup.gif'], [':thumbsdown:', 'thumbsdown.gif'], [':blush:', 'blush.gif'], [':weep:', 'weep.gif'], [':yes:', 'yes.gif'], [':no:', 'no.gif'], [':love:', 'love.gif'], [':?:', 'question.gif'], [':!:', 'excl.gif'], [':idea:', 'idea.gif'], [':arrow:', 'arrow.gif'], [':hmm:', 'hmm.gif'], [':hmmm:', 'hmmm.gif'], [':huh:', 'huh.gif'], [':w00t:', 'w00t.gif'], [':geek:', 'geek.gif'], [':look:', 'look.gif'], [':rolleyes:', 'rolleyes.gif'], [':kiss:', 'kiss.gif'], [':shifty:', 'shifty.gif'], [':blink:', 'blink.gif'], [':smartass:', 'smartass.gif'], [':sick:', 'sick.gif'], [':crazy:', 'crazy.gif'], [':wacko:', 'wacko.gif'], [':alien:', 'alien.gif'], [':wizard:', 'wizard.gif'], [':wave:', 'wave.gif'], [':wavecry:', 'wavecry.gif'], [':baby:', 'baby.gif'], [':ras:', 'ras.gif'], [':sly:', 'sly.gif'], [':devil:', 'devil.gif'], [':evil:', 'evil.gif'], [':godisevil:', 'evil.gif'], [':evilmad:', 'evilmad.gif'], [':yucky:', 'yucky.gif'], [':nugget:', 'nugget.gif'], [':sneaky:', 'sneaky.gif'], [':smart:', 'smart.gif'], [':shutup:', 'shutup.gif'], [':shutup2:', 'shutup2.gif'], [':yikes:', 'yikes.gif'], [':flowers:', 'flowers.gif'], [':wub:', 'wub.gif'], [':osama:', 'osama.gif'], [':saddam:', 'saddam.gif'], [':santa:', 'santa.gif'], [':indian:', 'indian.gif'], [':guns:', 'guns.gif'], [':crockett:', 'crockett.gif'], [':zorro:', 'zorro.gif'], [':snap:', 'snap.gif'], [':beer:', 'beer.gif'], [':beer2:', 'beer2.gif'], [':drunk:', 'drunk.gif'], [':mama:', 'mama.gif'], [':pepsi:', 'pepsi.gif'], [':medieval:', 'medieval.gif'], [':rambo:', 'rambo.gif'], [':ninja:', 'ninja.gif'], [':hannibal:', 'hannibal.gif'], [':party:', 'party.gif'], [':snorkle:', 'snorkle.gif'], [':evo:', 'evo.gif'], [':king:', 'king.gif'], [':chef:', 'chef.gif'], [':mario:', 'mario.gif'], [':pope:', 'pope.gif'], [':fez:', 'fez.gif'], [':cap:', 'cap.gif'], [':cowboy:', 'cowboy.gif'], [':pirate:', 'pirate2.gif'], [':rock:', 'rock.gif'], [':cigar:', 'cigar.gif'], [':icecream:', 'icecream.gif'], [':oldtimer:', 'oldtimer.gif'], [':wolverine:', 'wolverine.gif'], [':strongbench:', 'strongbench.gif'], [':weakbench:', 'weakbench.gif'], [':bike:', 'bike.gif'], [':music:', 'music.gif'], [':book:', 'book.gif'], [':fish:', 'fish.gif'], [':stupid:', 'stupid.gif'], [':dots:', 'dots.gif'], [':kelso:', 'kelso.gif'], [':red:', 'red.gif'], [':dobbs:', 'bobdobbs.gif'], [':axe:', 'axe.gif'], [':hooray:', 'hooray.gif'], [':yay:', 'yay.gif'], [':cake:', 'cake.gif'], [':hbd:', 'hbd.gif'], [':hi:', 'hi.gif'], [':offtopic:', 'offtopic.gif'], [':band:', 'band.gif'], [':hump:', 'hump.gif'], [':punk:', 'punk.gif'], [':bounce:', 'bounce.gif'], [':mbounce:', 'mbounce.gif'], [':group:', 'group.gif'], [':console:', 'console.gif'], [':smurf:', 'smurf.gif'], [':soldiers:', 'soldiers.gif'], [':spidey:', 'spidey.gif'], [':rant:', 'rant.gif'], [':pimp:', 'pimp.gif'], [':nuke:', 'nuke.gif'], [':judge:', 'judge.gif'], [':jacko:', 'jacko.gif'], [':ike:', 'ike.gif'], [':greedy:', 'greedy.gif'], [':dumbells:', 'dumbells.gif'], [':clover:', 'clover.gif'], [':shit:', 'shit.gif'], [':thankyou:', 'thankyou.gif'], [':horse:', 'horse.gif'], [':box:', 'boxing.gif'], [':fight:', 'fighting05.gif'], [':gathering:', 'gathering.gif'], [':hang:', 'hang.gif'], [':chair:', 'chair.gif'], [':spam:', 'spam.gif'], [':bandana:', 'bandana.gif'], [':construction:', 'construction.gif'], [':oops:', 'oops.gif'], [':rip:', 'rip.gif'], [':sheep:', 'sheep.gif'], [':tease:', 'tease.gif'], [':spider:', 'spider.gif'], [':shoot:', 'shoot.gif'], [':shoot2:', 'shoot2.gif'], [':police:', 'police.gif'], [':lovers:', 'lovers.gif'], [':kissing:', 'kissing.gif'], [':kissing2:', 'kissing2.gif'], [':jump:', 'jump.gif'], [':happy2:', 'happy2.gif'], [':clap:', 'clap.gif'], [':clap2:', 'clap2.gif'], [':chop:', 'chop.gif'], [':lttd:', 'lttd.gif'], [':whip:', 'whip.gif'], [':yawn:', 'yawn.gif'], [':bow:', 'bow.gif'], [':slap:', 'slap.gif'], [':wall:', 'wall.gif'], [':please:', 'please.gif'], [':sorry:', 'sorry.gif'], [':finger:', 'finger.gif'], [':brown:', 'brownnoser.gif'], [':cloud9:', 'cloud9.gif'], [':pity:', 'mrt.gif'], [':mug:', 'mug.gif'], [':banned:', 'banned.gif'], [':tkfu:', 'ninja_hide.gif'], [':baldfresh:', 'baldy.png'], [':camera:', 'camera.gif'], [':loggeek:', 'log.jpg'], [':coleman83:', 'random'], [':locked:', 'lockd.gif'], [':tomjones1:', 'tomjones01.png'], [':tomjones2:', 'tomjones02.png'], [':D', 'biggrin.gif'], [':|', 'blank.gif'], [':\'(', 'crying.gif'], ['>.>', 'eyesright.gif'], [':frown:', 'frown.gif'], ['<3', 'heart.gif'], [':nod:', 'nod.gif'], [':ohno:', 'ohnoes.gif'], [':ohnoes:', 'ohnoes.gif'], [':omg:', 'omg.gif'], [':o', 'ohshit.gif'], [':O', 'ohshit.gif'], [':paddle:', 'paddle.gif'], [':(', 'sad.gif'], [':)', 'smile.gif'], [':thanks:', 'thanks.gif'], [':P', 'tongue.gif'], [':-p', 'tongue.gif'], [':wink:', 'wink.gif'], [':creepy:', 'creepy.gif'], [':worried:', 'worried.gif'], [':wtf:', 'wtf.gif'], [':lmgtfy:', 'lmgtfy.gif'], [':fart:', 'fart.gif'], [':hifi:', 'hifi.gif'], [':cheers:', 'cheers.gif'], [':jambox:', 'jambox.gif'], [':rimshot:', 'rimshot.gif'], [':rockout:', 'rockout.gif'], [':yourmom:', 'yourmom.gif'], [':bong:', 'bong.gif'], [':peace:', 'hippie.gif'], [':vinyl:', 'vinyl.gif'], ['\\m/', 'horns.gif']], 882 | what: [[":qmarklove:", "ilqmark-what.gif"], [":ajaxlove:", "ilajax-what.gif"], [":athenalove:", "ilathena-what.gif"], [":alderaanlove:", "ilalderaan-what.gif"], [":anankelove:", "ilananke-what.gif"], [":bashmorelove:", "ilbashmore-what.gif"], [":brancusilove:", "ilbrancusi-what.gif"], [":brdlove:", "ilbrd-what.gif"], [":carllove:", "ilcarl-what.gif"], [":dumontlove:", "ildumont-what.gif"], [":entrapmentlove:", "ilentrapment-what.gif"], [":espressolove:", "ilespresso-what.gif"], [":gamehendgelove:", "ilgamehendge-what.gif"], [":hyperionlove:", "ilhyperion-what.gif"], [":iapetuslove:", "iliapetus-what.gif"], [":irimiaslove:", "ilirimias-what.gif"], [":irredentialove:", "ilirredentia-what.gif"], [":kitchenstafflove:", "ilkitchenstaff-what.gif"], [":kopitiamlove:", "ilkopitiam-what.gif"], [":kryptoslove:", "ilkryptos-what.gif"], [":lenreklove:", "illenrek-what.gif"], [":lesadieuxlove:", "illesadieux-what.gif"], [":lisbethlove:", "illisbeth-what.gif"], [":nandolove:", "ilnando-what.gif"], [":porkpielove:", "ilporkpie-what.gif"], [":sinetaxlove:", "ilsinetax-what.gif"], [":theseuslove:", "iltheseus-what.gif"], [":toruslove:", "iltorus-what.gif"], [":wtelove:", "ilwte-what.gif"], [":zettellove:", "ilzettel-what.gif"], [":a9love:", "ila9-what.gif"], [":bionicsockslove:", "ilbionicsocks-what.gif"], [":chailove:", "ilchai-what.gif"], [":changleslove:", "ilchangles-what.gif"], [":claptonlove:", "ilclapton-what.gif"], [":emmlove:", "ilemm-what.gif"], [":fzeroxlove:", "ilfzerox-what.gif"], [":hothlove:", "ilhoth-what.gif"], [":interstellarlove:", "ilinterstellar-what.gif"], [":jowalove:", "iljowa-what.gif"], [":kharonlove:", "ilkharon-what.gif"], [":lylaclove:", "illylac-what.gif"], [":marienbadlove:", "ilmarienbad-what.gif"], [":marigoldslove:", "ilmarigolds-what.gif"], [":mavericklove:", "ilmaverick-what.gif"], [":mnlove:", "ilmn-what.gif"], [":mre2melove:", "ilmre2me-what.gif"], [":mugglelove:", "ilmugglehump-what.gif"], [":nightoathlove:", "ilnightoath-what.gif"], [":oinkmeuplove:", "iloinkmeup-what.gif"], [":padutchlove:", "ilpadutch-what.gif"], [":paintrainlove:", "ilpaintrain-what.gif"], [":sdfflove:", "ilsdff-what.gif"], [":seraphiellove:", "ilseraphiel-what.gif"], [":sisterraylove:", "ilsisterray-what.gif"], [":snowflakelove:", "ilsnowflake-what.gif"], [":soamlove:", "ilsoam-what.gif"], [":spacireleilove:", "ilspacirelei-what.gif"], [":stwlove:", "ilstw-what.gif"], [":whatmanlove:", "ilwhatman-what.gif"], [":whynotmicelove:", "ilwhynotmice-what.gif"], [":xorianlove:", "ilxorian-what.gif"]] 883 | }, 884 | blueprints: { 885 | gazelle: [ // pretty standard gazelle blueprint as of ... 2012 or 2013? 886 | ['b', 'i', 'u', 's'], ['color', 'size'], ['heading', 'important'], 887 | ['gz_left', 'gz_center', 'gz_right'], 888 | ['#', '*'], ['url', 'img'], ['quote'], ['hide', 'mature'], 889 | ['artist', 'torrent', 'user', 'wiki', 'gz_rule'], ['pre', 'gz_src', 'code', 'plain'], 890 | ['tex'], 891 | [ 'erase'], ['emoticon', 'shortcut', 'settings'] 892 | ] 893 | }, 894 | shortcuts: { 895 | alt: { 896 | c: 'gz_src', 897 | i: 'torrent' 898 | }, 899 | ctrl: { 900 | b: 'b', 901 | i: 'i', 902 | u: 'u', 903 | s: 's', 904 | g: 'code', 905 | k: '#', 906 | l: '*', 907 | h: 'url', 908 | m: 'img', 909 | d: 'erase' 910 | }, 911 | 'ctrl+alt': { 912 | i: 'important', 913 | e: 'emoticon', 914 | u: 'settings', 915 | x: 'shortcut' 916 | } 917 | }, 918 | setupShortcutMap: function () { 919 | dom.oEach(WhutBB.config.shortcuts, function (meta, letters) { 920 | // WhutBB.config.shortcuts 921 | dom.oEach(letters, function (letter, button) { 922 | // console.log(letter, button); 923 | if (!WhutBB.config.shortcutMap[button]) { 924 | WhutBB.config.shortcutMap[button] = []; 925 | } 926 | WhutBB.config.shortcutMap[button].push(meta + '+' + letter); 927 | }); 928 | }); 929 | 930 | // console.log('created', WhutBB.config.shortcutMap); 931 | }, 932 | getShortcut: function (modifier, letter) { 933 | if (this.shortcuts[modifier] && this.shortcuts[modifier][letter]) { 934 | return this.shortcuts[modifier][letter]; 935 | } 936 | }, 937 | getShortcutText: function (modifier) { // changes CTRL and ALT to Mac-centric keys if required // .replace(/(?:CTRL\+ALT)/g, 'ALT+CTRL') 938 | return WhutBB.mac ? modifier.toUpperCase().replace(/(?:CTRL)/g, '\u2318').replace(/(?:ALT)/g, '\u2325') : modifier.toUpperCase(); 939 | }, 940 | getSiteSettings: function (name) { 941 | if (WhutBB.db.sites[name]) { 942 | var settings = WhutBB.db.sites[name](); 943 | settings.name = name; 944 | return settings; 945 | } 946 | return {}; 947 | }, 948 | /** 949 | * Inserts or replaces buttons 950 | * Use this method before initializing the script (WhutBB.init) 951 | * @param buttons - object of objects 952 | */ 953 | insertButtons: function (buttons) { 954 | dom.oEach(buttons, function (name, object) { 955 | WhutBB.db.buttons[name] = object; 956 | }); 957 | }, 958 | /** 959 | * Adds emoticons to (an exisiting) emoticons DB array 960 | * Use this method before initializing the script (WhutBB.init) 961 | * 962 | * @param {string} name of the array in the emoticons DB to use 963 | * if none exist, it will be created 964 | * @param {array} emoticons 965 | * make sure to use an array of arrays 966 | * 967 | * Example: add two emoticons to WhutBB.db.emoticons.gazelle 968 | * WhutBB.db.addEmoticons('gazelle', [[':new:', 'new.png'], [':pop:', 'pop.png']]); 969 | */ 970 | addEmoticons: function (name, emoticons) { 971 | WhutBB.db.emoticons[name] = (WhutBB.db.emoticons[name] || []).concat(emoticons); 972 | }, 973 | /** 974 | * @param {array} emoticons 975 | */ 976 | uniqueEmoticons: function (emoticons) { 977 | var unique = {}, arr = [], i; 978 | 979 | dom.aEach(emoticons, function (e) { 980 | unique[e[0]] = e; 981 | }) 982 | 983 | dom.oEach(unique, function (key, obj) { 984 | arr.push(obj); 985 | }); 986 | 987 | return arr; 988 | } 989 | }; 990 | 991 | /** 992 | * Event manager 993 | * Aliases/references event data for easier use within various methods 994 | */ 995 | WhutBB.e = { 996 | current: null, // alias for the current event 997 | target: null, // alias for the current event target element 998 | whut: null, // alias for the current event's WhutBB instance 999 | macro: false, // flag for events called through a macro 1000 | set: function (event, target, wbb) { 1001 | WhutBB.e.current = event; 1002 | WhutBB.e.target = target; 1003 | WhutBB.e.whut = wbb; 1004 | }, 1005 | clean: function () { 1006 | this.current = this.target = this.whut = null; 1007 | } 1008 | }; 1009 | 1010 | /** 1011 | * Event Object 1012 | * 1013 | * Contains all possible events, divided into: 1014 | * 1) mouse, 2) key, and 3) general button events 1015 | * 1016 | * Mouse and Key events trigger Button events, depending 1017 | * on the button type 1018 | * 1019 | * As mentioned earlier, buttons with custom events should find 1020 | * a method with that button's name within WhutBB.evt.button.custom 1021 | * 1022 | * WhutBB instances register themselves with the 1023 | * register methods. 1024 | * 1025 | * The registers return an annonymous function that 1026 | * is used for any subsequent click or key events. 1027 | * 1028 | */ 1029 | WhutBB.evt = { 1030 | button: { // button events 1031 | custom: { // Custom button events 1032 | erase: function () { // erase button event 1033 | WhutBB.e.whut.textarea.value = ''; 1034 | }, 1035 | emoticonLoader: function () { // removes "View all emoticons." div and loads remaining emoticons 1036 | WhutBB.e.target.parentNode.removeChild(WhutBB.e.target); 1037 | WhutBB.Panel.attach.emoticons(WhutBB.config.emoticonMax - 1, 1038 | WhutBB.config.emoticons.length); 1039 | } 1040 | }, 1041 | macro: function (name, wbb) { // macro button events 1042 | if (!WhutBB.e.macro) { 1043 | WhutBB.e.macro = true; 1044 | dom.aEach(WhutBB.db.buttons[name].macro || [], function (name) { 1045 | // console.log(name); 1046 | dom.click(wbb.getButton(name)); 1047 | }); 1048 | WhutBB.e.macro = false; 1049 | } 1050 | }, 1051 | bbcode: function () { // bbcode buttons 1052 | WhutBB.Tag.get(WhutBB.e.target.name).insertTo(WhutBB.e.whut.textarea); 1053 | }, 1054 | emoticon: function () { // emoticon buttons 1055 | WhutBB.box.select(WhutBB.e.whut.textarea).insert([' ' + WhutBB.e.target.title, '']); 1056 | }, 1057 | panel: { // panel buttons 1058 | toggle: function (panel, el) { // el = WhutBB.e.target 1059 | var visible = el.classList.contains('wbbpressed'); // panel's current visibility 1060 | WhutBB.evt.button.panel.store(el); 1061 | if (visible) { 1062 | el.classList.remove('wbbpressed'); 1063 | panel.classList.add('wbbhide'); 1064 | } else { 1065 | WhutBB.e.whut.wrap.appendChild(WhutBB.Panel.global[el.name].element); 1066 | el.classList.add('wbbpressed'); 1067 | panel.classList.remove('wbbhide'); 1068 | } 1069 | WhutBB.evt.button.panel.toggleText(visible, el.firstChild); 1070 | }, 1071 | toggleText: function (visible, span) { 1072 | if (span.dataset.toggle) { 1073 | span.firstChild.nodeValue = span.dataset[visible ? 'txt' : 'toggle']; 1074 | } 1075 | }, 1076 | store: function (button) { 1077 | // remove pressed (toggled) state of previous stored button 1078 | if (WhutBB.evt.button.panel.stored[button.name]) { 1079 | WhutBB.evt.button.panel.stored[button.name].className = 'whutbbutton'; 1080 | WhutBB.evt.button.panel.toggleText(true, WhutBB.evt.button.panel.stored[button.name].firstChild); 1081 | } 1082 | WhutBB.evt.button.panel.stored[button.name] = button; 1083 | }, 1084 | stored: {} 1085 | } 1086 | }, 1087 | delegate: { 1088 | button: function () { // TODO Polymorphism plz? 1089 | var t = WhutBB.e.target; 1090 | // console.log(t); 1091 | WhutBB.e.current.stopPropagation(); 1092 | if (+t.dataset.type === -3) { 1093 | // console.log(-3); 1094 | return WhutBB.evt.button.macro(t.name, WhutBB.e.whut); 1095 | } 1096 | if (+t.dataset.type === -2) { 1097 | // console.log(-2); 1098 | return WhutBB.evt.button.custom[t.name](); 1099 | } 1100 | if (+t.dataset.type === -1) { 1101 | // console.log(-1); 1102 | return WhutBB.evt.button.panel.toggle(WhutBB.Panel.global[t.name].element, t); 1103 | } 1104 | if (t.dataset.type === 'emoticon') { 1105 | // console.log(2); 1106 | return WhutBB.evt.button.emoticon(); 1107 | } 1108 | // console.log(1); 1109 | return WhutBB.evt.button.bbcode(); 1110 | }, 1111 | edit: function (evt) { // RegExp.lastParen should contain an ID 1112 | var el = evt.target, 1113 | attr = el.getAttribute('onclick') || '', 1114 | id, 1115 | interv; 1116 | 1117 | if (attr.match(/(?:Edit_Form\('(\d+))/)) { 1118 | id = RegExp.lastParen; 1119 | interv = window.setInterval(function () { 1120 | var txt = document.getElementById('editbox' + id), w; 1121 | 1122 | if (txt) { 1123 | window.clearInterval(interv); 1124 | console.log('clearing', interv); 1125 | txt.dataset.wbb = id; 1126 | 1127 | w = WhutBB.set[id]; 1128 | if (w) { 1129 | w.update(txt); 1130 | } else { 1131 | WhutBB.create(txt, true); 1132 | } 1133 | } 1134 | }, 500); 1135 | } 1136 | if (attr.match(/(?:Preview_Edit\((\d+))/) || attr.match(/(?:Save_Edit\((\d+))/)) { 1137 | return WhutBB.set[RegExp.lastParen].hide(); 1138 | } 1139 | if (attr.match(/(?:Cancel_Preview\((\d+))/)) { 1140 | return WhutBB.set[RegExp.lastParen].show(); 1141 | } 1142 | }, 1143 | report: function (evt) { 1144 | var el = evt.target, 1145 | attr = el.getAttribute('onchange') || ''; 1146 | 1147 | if (attr.match(/(?:ChangeReportType\()/)) { 1148 | window.setTimeout(function () { 1149 | var txt = document.getElementById('dynamic_form'); 1150 | 1151 | if (txt) { 1152 | WhutBB.factory(); 1153 | return WhutBB.set[RegExp.lastParen].show(); 1154 | } 1155 | }, 500); 1156 | } 1157 | }, 1158 | inbox: function (evt) { // todo inbox.php 1159 | var el = evt.target, 1160 | attr = el.getAttribute('onclick') || '', 1161 | qp = document.getElementById('quickpost'), 1162 | ps = qp.previousElementSibling; 1163 | // console.log('inbox'); 1164 | if (/(?:preview)/i.test(attr)) { 1165 | qp.classList.add('wbbhide'); 1166 | ps.classList.add('wbbhide'); 1167 | } else if (/(?:edit)/i.test(attr)) { 1168 | qp.classList.remove('wbbhide'); 1169 | ps.classList.remove('wbbhide'); 1170 | } 1171 | }, 1172 | settings: { // settings events 1173 | update: function () { // translates checks into settings to store 1174 | var settings = {}, saved; 1175 | 1176 | dom.aEach(WhutBB.Panel.global.settings.element.getElementsByTagName('input'), function (el) { 1177 | settings[el.name] = el.checked; 1178 | }); 1179 | 1180 | saved = WhutBB.user.save(settings); 1181 | 1182 | // calls a sub function based on a setting's name 1183 | // additional argument if the settings were saved 1184 | if (this.fn[WhutBB.e.target.name]) { 1185 | this.fn[WhutBB.e.target.name](saved); 1186 | } 1187 | }, 1188 | fn: { 1189 | icon: function () { // toggles button icons 1190 | var cls = 'wbbcode ' + WhutBB.$.getWrapClass(); 1191 | dom.oEach(WhutBB.set, function (id, wbb) { 1192 | wbb.wrap.className = cls; 1193 | }); 1194 | }, 1195 | theme: function () { 1196 | this.icon(); 1197 | }, 1198 | link: function () { // toggles WhutBBCode? link 1199 | var cls = 'wbblink ' + (WhutBB.user.settings.link ? '' : ' wbbhide'); 1200 | dom.oEach(WhutBB.set, function (id, wbb) { 1201 | wbb.panels.link.className = cls; 1202 | }); 1203 | } 1204 | } 1205 | } 1206 | }, 1207 | mouse: { 1208 | target: function (target) { 1209 | // Event target issue -- This returns an actual button, instead of the span.icon-* within it 1210 | return (/(?:icon-)/).test(target.getAttribute('class')) ? target.parentNode : target; 1211 | }, 1212 | down: function () { 1213 | if (WhutBB.e.target.dataset.type) { 1214 | return WhutBB.evt.delegate.button(); 1215 | } 1216 | if (WhutBB.e.target.dataset.setting) { 1217 | return WhutBB.evt.delegate.settings.update(); 1218 | } 1219 | }, 1220 | register: function (wbb) { 1221 | return function (evt) { // context for _this_ is the container div.wbbbuttons 1222 | // console.log('mouse.register/anon'); 1223 | WhutBB.e.set(evt, WhutBB.evt.mouse.target(evt.target), wbb); 1224 | WhutBB.evt.mouse.down(); 1225 | WhutBB.e.clean(); 1226 | }; 1227 | } 1228 | }, 1229 | key: { 1230 | down: function () { 1231 | this.fire(this.button()); 1232 | }, 1233 | letter: function () { 1234 | return String.fromCharCode(WhutBB.e.current.which || WhutBB.e.current.keyCode).toLowerCase(); 1235 | }, 1236 | modifier: function () { 1237 | // meta key aliases to ctrl 1238 | var cm = WhutBB.e.current.ctrlKey || WhutBB.e.current.metaKey; 1239 | if (cm && WhutBB.e.current.altKey) { return 'ctrl+alt'; } 1240 | if (cm) { return 'ctrl'; } 1241 | if (WhutBB.e.current.altKey) { return 'alt'; } 1242 | return ''; 1243 | }, 1244 | button: function () { 1245 | return WhutBB.e.whut.getButton(WhutBB.db.getShortcut(this.modifier(), this.letter())); 1246 | }, 1247 | fire: function (button) { 1248 | if (button) { 1249 | WhutBB.e.current.preventDefault(); 1250 | WhutBB.e.target = button; 1251 | WhutBB.evt.mouse.down(); 1252 | } 1253 | }, 1254 | register: function (wbb) { 1255 | return function (evt) { 1256 | // console.log('key.register/anon'); 1257 | WhutBB.e.set(evt, this, wbb); // _this_ is a textarea 1258 | WhutBB.evt.key.down(); 1259 | WhutBB.e.clean(); 1260 | }; 1261 | } 1262 | } 1263 | }; 1264 | 1265 | /** 1266 | * Box Object (aka textarea stuff) 1267 | * 1268 | * How it works: 1269 | * WhutBB.box.select(textarea).insert(['{start}', '{end}']); 1270 | * 1271 | * An array is used because Tags parse to that data type. 1272 | * 1273 | * Result: 1274 | * 1275 | * 1276 | * It's (more) magical when used in an event. 1277 | */ 1278 | WhutBB.box = { 1279 | select: function (textarea) { 1280 | this.textarea = textarea; 1281 | WhutBB.box.range = this.getRange(); 1282 | return this; 1283 | }, 1284 | getRange: function () { 1285 | if (this.textarea.selectionStart < 0) { return; } 1286 | if (this.textarea.selectionEnd > this.textarea.value.length) { 1287 | this.textarea.selectionEnd = this.textarea.value.length; 1288 | } 1289 | var s = this.textarea.selectionStart || 0, 1290 | e = this.textarea.selectionEnd || 0; 1291 | return { 1292 | start: s, 1293 | end: e, 1294 | selection: this.textarea.value.substring(s, e) || '' 1295 | }; 1296 | }, 1297 | insert: function (tag) { 1298 | var pre = this.textarea.value.substring(0, this.range.start) + tag[0], 1299 | post = tag[1] + this.textarea.value.substring(this.range.end); 1300 | this.textarea.value = pre + this.range.selection + post; 1301 | WhutBB.box.selection(pre.length); 1302 | }, 1303 | selection: function (start) { 1304 | window.setTimeout(() => { 1305 | this.textarea.focus(); 1306 | this.textarea.setSelectionRange(start, start + this.range.selection.length); 1307 | }, 100); 1308 | } 1309 | }; 1310 | 1311 | /** 1312 | * WhutBBCode Settings Class 1313 | * Intended to be a singleton used within WhutBB.init() 1314 | * 1315 | * This class is used to store site configurations for WhutBBCode? 1316 | * Using these options, the script can create buttons, emoticons, etc. 1317 | * 1318 | * Effectively, without any settings, nothing really happens. 1319 | * 1320 | * The most important option is blueprint, which tells the script which 1321 | * buttons to create. 1322 | * 1323 | * The Panel class uses this blueprint to construct buttons, put them in the button 1324 | * panel, and attach them to WhutBB instances. 1325 | * 1326 | * All buttons that exist in WhutBB.db.buttons are stored as validButtons. The script 1327 | * uses validButtons to list available shortcuts to the user. 1328 | * 1329 | * To reiterate, options are the most important aspect of this class 1330 | * 1331 | * param @options object with the following (mostly optional) attributes 1332 | * 1333 | * if none is given, the script will try to find an appropriate match 1334 | * for the site. 1335 | * 1336 | * if no setting is found, the "generic" default options will be used 1337 | * 1338 | * name: (String) [ default: '' (empty string) ] 1339 | * the website's name 1340 | * 1341 | * link: 1342 | * link to information about the site's BBCode or WhutBBCode? itself (default) 1343 | * 1344 | * beneath: (Boolean) [ default: true ] 1345 | * location to insert buttons, beneath or above the textarea 1346 | * 1347 | * blueprint: (String|Array) [ default: [] (empty array) ] 1348 | * - string: name of the array from WhutBB.db.blueprints 1349 | * currently only 'gazelle' exists (WhutBB.db.blueprints.gazelle) 1350 | * use arrays for custom configurations! 1351 | * 1352 | * tip: use 'gazelle' for sites that use the default gazelle BBCode 1353 | * 1354 | * - array: an array of arrays containing buttons to create 1355 | * 1356 | * group buttons together to create a set of similiar types 1357 | * 1358 | * example: 1359 | * 1360 | * blueprint: [ 1361 | * ['b', 'i', 'u'], // a set of three buttons 1362 | * ['shortcut', 'settings'] // a set of two 1363 | * ] 1364 | * 1365 | * buttons are then placed in the DOM in the following order 1366 | * [b][i][u] [?][+] 1367 | * 1368 | * each set is separated by a space 1369 | * 1370 | * width: (Number) [ default: 430 ] 1371 | * a width (in pixels) to set for the WhutBB.wrap so that buttons fit well 1372 | * 1373 | * emoticonDir: [ default: '' ] 1374 | * absolute or relative (to the current site) location to where emoticons reside 1375 | * it should end in a slash (/) 1376 | * 1377 | * emoticonMax: (Number) [ default: 39 ] 1378 | * a limit of emoticons to display to the user 1379 | * eg: If 100 emoticons exist, the script will display the first 39 1380 | * a link to show the rest of the emoticons will be generated 1381 | * the intent of this is to reduce loading times of emoticon images 1382 | * 1383 | * emoticons: (String|Array) [ default: [['', '']] (a null emoticon) ] 1384 | * - string: name of the array from WhutBB.db.emoticons 1385 | * for example, possible options: 'gazelle', 'waffles', 'indie' 1386 | * 1387 | * - array: an array of arrays containing emoticons to create 1388 | * 1389 | * the sub-arrays are formed by the emoticon text to insert and the location of the 1390 | * image to show in the emoticon list 1391 | * 1392 | * [ ["text to append to textarea", "url or path to an image"] ] 1393 | * 1394 | * any arbitrary string can be appended to the textarea 1395 | * 1396 | * example: 1397 | * emoticons: [ [":)", "happy.png"], [":D", "grin.png"], [":(", "sad.png"] ] 1398 | * 1399 | * these create images with the emoticon directory (emoticonDir) 1400 | * if the directory varies, it should be included 1401 | * 1402 | * example: 1403 | * [':D', 'some-other-dir/grin.png'] 1404 | * 1405 | * absolute paths are supported 1406 | * 1407 | * example: 1408 | * [':]', 'https://emto/ticon.png'] 1409 | * 1410 | * clicking on the image "https://emto/ticon.png" will append ":]" to the textarea 1411 | * 1412 | * ['[img]https://emto/ticon.gif[/img]', 'https://emto/ticon.gif'] 1413 | * 1414 | * in the second example, the string "[img]https://emto/ticon.gif[/img]" will be appended 1415 | * 1416 | * To add emoticons to an existing object from WhutBB.db.emoticons, see 1417 | * WhutBB.db.addEmoticons(). 1418 | * 1419 | * shortcuts: (Object) [ default: WhutBB.db.shortcuts ] 1420 | * an object of objects that account for shotcut mapping, see "Keyboard Shortcuts" 1421 | * part of the documentation 1422 | * 1423 | * example: 1424 | * shortcuts: { 1425 | * ctrl: { 1426 | * i: 'i' 1427 | * }, 1428 | * 'alt+ctrl': { 1429 | * x: 'shotcuts' 1430 | * } 1431 | * } 1432 | * 1433 | */ 1434 | WhutBB.Settings = function Settings(options) { 1435 | var def = WhutBB.db.sites[':default'](); 1436 | 1437 | try { 1438 | this.name = options.name || def.name; 1439 | this.link = options.link || def.link; 1440 | 1441 | this.beneath = !!options.beneath; 1442 | this.blueprint = (typeof options.blueprint === 'string') ? WhutBB.db.blueprints[options.blueprint] : (options.blueprint || def.blueprint); // options.blueprint || def.blueprint; 1443 | 1444 | if (document.location.hash === '#wbb') 1445 | this.blueprint = WhutBB.db.sites[":test"]().blueprint; 1446 | this.width = options.width || def.width; 1447 | 1448 | this.emoticonDir = options.emoticonDir || def.emoticonDir; 1449 | this.emoticonMax = options.emoticonMax || def.emoticonMax; 1450 | this.emoticons = (typeof options.emoticons === 'string') ? WhutBB.db.emoticons[options.emoticons] : (options.emoticons || def.emoticons); // null emoticon 1451 | 1452 | this.shortcuts = options.shortcuts || WhutBB.db.shortcuts; 1453 | } catch (e) { 1454 | dom.oEach(def, function (name, setting) { 1455 | this[name] = setting; 1456 | }, this); 1457 | } 1458 | this.validButtons = {}; 1459 | this.shortcutMap = {}; 1460 | }; 1461 | 1462 | /** 1463 | * Button 1464 | * 1465 | * Generic button class that encapsulates data from 1466 | * WhutBB.db.buttons objects and creates a button element 1467 | * 1468 | * Do not use the constructor directly, use Button.create instead! 1469 | */ 1470 | WhutBB.Button = (function () { 1471 | 1472 | function Button(name) { 1473 | this.name = name; 1474 | this.data = WhutBB.db.buttons[name]; 1475 | } 1476 | 1477 | /** 1478 | * Button.create returns a Button or a Null button 1479 | * All possible buttons located at WhutBB.db.buttons 1480 | */ 1481 | Button.create = function (button) { 1482 | if (WhutBB.db.buttons[button]) { 1483 | return new Button(button); 1484 | } 1485 | return Button.Null; 1486 | }; 1487 | 1488 | /** 1489 | * Creates a button element and also validates it 1490 | */ 1491 | Button.prototype.make = function () { 1492 | var el = dom.dom('button', { 1493 | className: 'whutbbutton', 1494 | name: this.name, 1495 | title: this.data.title + this.getShortcut(this.name), 1496 | attr: { 1497 | type: 'button', 1498 | 'data-type': this.data.type || 'button' 1499 | } 1500 | }, dom.dom('span', { 1501 | className: 'wbb-icon wbb-icon-' + this.data.icon, 1502 | txt: this.data.display || this.name, 1503 | attr: { 1504 | 'data-txt': this.data.display || this.name, 1505 | 'data-toggle': this.data.toggle || '' 1506 | } 1507 | })); 1508 | 1509 | this.validate(); 1510 | return el; 1511 | }; 1512 | 1513 | /** 1514 | * Validates a button by adding it to WhutBB.config.validButtons 1515 | */ 1516 | Button.prototype.validate = function () { 1517 | WhutBB.config.validButtons[this.name] = true; 1518 | return this; 1519 | }; 1520 | 1521 | Button.prototype.getShortcut = function (name) { 1522 | var title = ''; 1523 | 1524 | if (WhutBB.config.shortcutMap[name]) { 1525 | title = ' (' + WhutBB.config.shortcutMap[name].join(', ') + ')'; 1526 | } 1527 | 1528 | return WhutBB.db.getShortcutText(title); 1529 | }; 1530 | 1531 | /** 1532 | * Space creates a single-spaced text node. 1533 | * 1534 | * Both Space and Null objects are intended to mimic Buttons 1535 | * without using any real inheritance 1536 | */ 1537 | Button.Space = { 1538 | make: function () { 1539 | return document.createTextNode(' '); 1540 | }, 1541 | validate: function () { 1542 | return this; 1543 | }, 1544 | data: {} 1545 | }; 1546 | 1547 | /** 1548 | * Null creates a simple text node. 1549 | * It's used when there is no real button in the db. 1550 | */ 1551 | Button.Null = { 1552 | make: function () { 1553 | return document.createTextNode(''); 1554 | }, 1555 | validate: function () { 1556 | return this; 1557 | }, 1558 | data: {} 1559 | }; 1560 | 1561 | Button.emoticon = function (emoticonData) { 1562 | return dom.dom('img', { 1563 | title: emoticonData[0], 1564 | alt: emoticonData[0], 1565 | src: /^(?:http)/g.test(emoticonData[1]) ? emoticonData[1] : WhutBB.config.emoticonDir + emoticonData[1], 1566 | attr: { 1567 | 'data-type': 'emoticon' 1568 | } 1569 | }); 1570 | }; 1571 | 1572 | Button.emoticonLoader = function () { 1573 | return dom.dom('div', { 1574 | className: 'emoticonLoader', 1575 | name: 'emoticonLoader', 1576 | txt: 'View all emoticons.', 1577 | title: 'Loads all emoticons.', 1578 | attr: { 1579 | 'data-type': -2 1580 | } 1581 | }); 1582 | }; 1583 | 1584 | return Button; 1585 | 1586 | }()); 1587 | 1588 | /** 1589 | * Panel Class 1590 | * Generates all the panels used in the script. 1591 | * 1592 | * A panel is an element intended to be within a WhutBBInstance.wrap div. 1593 | * 1594 | * eg: 1595 | * { div (WhutBBInstance.wrap) 1596 | * [ wbb link panel ] 1597 | * [ buttons panel ] 1598 | * [ settings panel* ] 1599 | * [ shortcuts panel* ] 1600 | * } 1601 | * 1602 | * *Global panels 1603 | * 1604 | * Use Panel.factory, instead of new Panel(). 1605 | * 1606 | * Global (or public) panels are static and part of the Panel.global object, 1607 | * not a WhutBB instance. They are typically transient, meaning that 1608 | * they appear in different WhutBB.wraps depending on the toggle state 1609 | * 1610 | * For example, emoticons are appended to WBB instace for textarea 1 when its 1611 | * emoticon button is clicked, but once WBB instace for textarea 2's emoticon button 1612 | * is clicked, the emoticon panel will be moved to WBB 2's wrap. 1613 | * 1614 | * This aliviates the need to generate each panel separately for every instance. 1615 | * This means that if there are 100s of emoticons, they will only be created once 1616 | * and moved around as needed, instead of creating 100s of emoticons per instance/textarea. 1617 | * 1618 | * Private (non-global) panels are stored in the Panel.set object. 1619 | * Once panels are initially created within Panel.construct(), 1620 | * private panels can be copied to (copyTo) a WhutBB instance. 1621 | * 1622 | * The only two private panels are Button and Link, because they 1623 | * are not meant to be transient. Buttons are needed at every instance. 1624 | * 1625 | */ 1626 | WhutBB.Panel = (function () { 1627 | 1628 | /** 1629 | * An element is part of the instance 1630 | */ 1631 | function Panel(element) { 1632 | this.element = element; 1633 | } 1634 | 1635 | /** 1636 | * A set of private panels 1637 | */ 1638 | Panel.set = {}; 1639 | 1640 | /** 1641 | * A set of global panels 1642 | */ 1643 | Panel.global = {}; 1644 | 1645 | /** 1646 | * Panel.factory creates both global and private panels 1647 | * 1648 | * @param name for the panel 1649 | * @param element to encapsulate 1650 | * @param priv true for private panels, otherwise global 1651 | */ 1652 | Panel.factory = function (name, element, priv) { 1653 | if (priv) { 1654 | if (!Panel.set[name]) { 1655 | Panel.set[name] = new Panel(element); 1656 | } 1657 | return Panel.set[name]; 1658 | } 1659 | if (!Panel.global[name]) { 1660 | Panel.global[name] = new Panel(element); 1661 | } 1662 | return Panel.global[name]; 1663 | }; 1664 | 1665 | /** 1666 | * Creates and initializes every necessary panel 1667 | */ 1668 | Panel.construct = function () { 1669 | Panel.factory('link', dom.dom('div', {className: 'wbblink' + (WhutBB.user.settings.link ? '' : ' wbbhide') }, 1670 | dom.dom('a', {href: WhutBB.config.link, title: 'Version r.' + update.version, txt: 'WhutBBCode?', target: '_blank'})), true); 1671 | Panel.factory('button', dom.dom('div', {className: 'wbbbuttons'}), true); 1672 | 1673 | // Global Panels 1674 | Panel.factory('shortcut', dom.dom('ul', {className: 'wbbshortcut wbbhide'})); 1675 | Panel.factory('emoticon', dom.dom('div', {className: 'wbbemot wbbhide'})); 1676 | Panel.factory('settings', dom.dom('div', {className: 'wbbset wbbhide'}, null, document.body)); 1677 | Panel.factory('console', dom.dom('div', {className: 'wbbcon', txt: ''})); 1678 | Panel.attach.fill(); 1679 | }; 1680 | 1681 | /** 1682 | * Copies private panels to a WhutBB Instance 1683 | */ 1684 | Panel.copyTo = function (wbbInst) { 1685 | wbbInst.panels = {}; 1686 | dom.oEach(Panel.set, function (name, panel) { 1687 | wbbInst.panels[name] = panel.element.cloneNode(true); 1688 | wbbInst.wrap.appendChild(wbbInst.panels[name]); 1689 | }); 1690 | }; 1691 | 1692 | /** 1693 | * Prints a message to the console 1694 | */ 1695 | Panel.message = function (text, time) { 1696 | var el = WhutBB.Panel.global.console.element; 1697 | el.textContent = text; 1698 | window.setTimeout(function () { 1699 | el.textContent = ''; 1700 | }, isNaN(+time) ? 2500 : time); 1701 | }; 1702 | 1703 | Panel.attach = { 1704 | fill: function () { 1705 | // fills the panels appropriately 1706 | this.buttons(); 1707 | this.emoticons(-1, Math.min(WhutBB.config.emoticons.length, 1708 | WhutBB.config.emoticonMax)); 1709 | this.settings(); 1710 | this.shortcuts(); 1711 | }, 1712 | buttons: function () { 1713 | var f = document.createDocumentFragment(); 1714 | dom.aEach(WhutBB.config.blueprint, function (set) { 1715 | dom.aEach(set, function (name) { 1716 | f.appendChild(WhutBB.Button.create(name).make()); 1717 | }); 1718 | f.appendChild(WhutBB.Button.Space.make()); 1719 | }); 1720 | Panel.set.button.element.appendChild(f); 1721 | f = null; 1722 | }, 1723 | emoticons: function (i, max) { 1724 | var f = document.createDocumentFragment(); 1725 | while (++i < max) { 1726 | f.appendChild(WhutBB.Button.emoticon(WhutBB.config.emoticons[i])); 1727 | } 1728 | // attach the div that loads all emoticons if required 1729 | if (max !== WhutBB.config.emoticons.length 1730 | && WhutBB.config.emoticons.length > WhutBB.config.emoticonMax) { 1731 | f.appendChild(WhutBB.Button.emoticonLoader()); 1732 | } 1733 | Panel.global.emoticon.element.appendChild(f); 1734 | f = null; 1735 | }, 1736 | settings: function () { 1737 | var list = []; 1738 | dom.oEach(WhutBB.user.options, function (name, data) { 1739 | list.push('
  • '); 1741 | }); 1742 | Panel.global.settings.element.innerHTML = ''; 1743 | Panel.global.settings.element.appendChild(Panel.global.console.element); 1744 | }, 1745 | shortcuts: function () { 1746 | var ul = Panel.global.shortcut.element; 1747 | var f = document.createDocumentFragment(); 1748 | 1749 | // todo change? 1750 | dom.oEach(WhutBB.config.shortcuts, function (key, shortcuts) { 1751 | dom.oEach(shortcuts, function (letter, button) { 1752 | if (WhutBB.config.validButtons[button]) { // Checks if the site uses this button 1753 | f.appendChild(dom.dom('li', { 1754 | innerHTML: [ 1755 | '', 1756 | WhutBB.db.getShortcutText(key), 1757 | '+', 1758 | letter.toUpperCase(), 1759 | '', 1760 | WhutBB.db.buttons[button].title 1761 | ].join('') 1762 | })); 1763 | } 1764 | }); 1765 | }); 1766 | 1767 | if (f.hasChildNodes()) { 1768 | f.appendChild(dom.dom('li', { 1769 | className: 'wbbnotes', 1770 | innerHTML: 'CTRL and Command () are interchangable' 1771 | })); 1772 | ul.appendChild(f); 1773 | } 1774 | } 1775 | }; 1776 | 1777 | return Panel; 1778 | 1779 | }()); 1780 | 1781 | /** 1782 | * Tag Class 1783 | * Creates a tag of given name 1784 | * 1785 | * Use Tag.get(), not new Tag()! 1786 | * Tag.get() uses lazy loading, and stores all new 1787 | * tags within Tags.tags[] 1788 | * 1789 | * A tag's type generates the appropriate parsing 1790 | * All tags parse as a two-index array 1791 | * 1792 | * If a tag does not require an endpoint (matching tag), 1793 | * an empty string is required 1794 | * 1795 | * ['[tag]', '[/tag]'] 1796 | * ['open', ''] 1797 | * ['', 'close'] 1798 | * 1799 | * Example, insert a tag directly into a textarea 1800 | * bTag = Tag.get('b'); 1801 | * bTag.insertTo(someTextarea); 1802 | * 1803 | * PS: Note the use of WhutBB.box within insertTo(). 1804 | */ 1805 | WhutBB.Tag = (function () { 1806 | 1807 | function Tag(text) { 1808 | Tag.tags[text] = this; 1809 | this.button = WhutBB.db.buttons[text]; 1810 | this.tag = this.button.tag || text; 1811 | } 1812 | 1813 | // Stores new Tags 1814 | Tag.tags = {}; 1815 | 1816 | // Types 1817 | Tag.BASIC = 0; 1818 | Tag.OPTION = 1; 1819 | Tag.OPTION_NOCLOSE = 2; 1820 | Tag.LIST = 3; 1821 | Tag.CUSTOM = 4; 1822 | 1823 | /** 1824 | * Gets a tag by a name. 1825 | * Finds a tag in the tags object or creates a new tag. 1826 | * Returns an update()'d tag 1827 | */ 1828 | Tag.get = function (name) { 1829 | if (WhutBB.db.buttons[name]) { 1830 | return (Tag.tags[name] || new Tag(name)).update(); 1831 | } 1832 | }; 1833 | 1834 | /** 1835 | * Each button has a type which is used as the parsing method 1836 | */ 1837 | Tag.types = { 1838 | 0: function () { // Basic tag [tag][/tag] 1839 | return ['[' + this.tag + ']', '[/' + this.tag + ']']; 1840 | }, 1841 | 1: function () { // [tag=option][/tag] 1842 | return ['[' + this.tag + '=' + this.option + ']', '[/' + this.tag + ']']; 1843 | }, 1844 | 2: function () { // [tag=] 1845 | return ['[' + this.tag + '=', ']']; 1846 | }, 1847 | 3: function () { // List [*] or [#] 1848 | var j = [], li = WhutBB.box.range.selection.split('\n'); 1849 | 1850 | if (li.length > 1) { 1851 | dom.aEach(li, function (item) { 1852 | j.push('[' + this.tag + ']' + item); 1853 | }, this); 1854 | WhutBB.box.range.selection = j.join('\n'); 1855 | return ['', '']; 1856 | } 1857 | 1858 | return ['\n[' + this.tag + ']', '']; 1859 | }, 1860 | 4: function () { // used for custom tags 1861 | if (typeof this.tag === 'string') { 1862 | return [this.tag, this.tag]; 1863 | } 1864 | return [this.tag[0], this.tag[1]]; 1865 | }, 1866 | 5: function () { // just [tag] 1867 | return ['[' + this.tag + ']', '']; 1868 | } 1869 | }; 1870 | 1871 | Tag.prototype.toString = function () { 1872 | return [this.tag, this.option, this.type].join(' '); 1873 | }; 1874 | 1875 | Tag.prototype.insertTo = function (textarea) { 1876 | WhutBB.box.select(textarea).insert(this.parse()); 1877 | }; 1878 | 1879 | /** 1880 | * Parse uses some JavaScript magic to get the function 1881 | * based on the tag type, and call it with _this_ tag's 1882 | * instance 1883 | */ 1884 | Tag.prototype.parse = function () { 1885 | return Tag.types[this.type].call(this); 1886 | }; 1887 | 1888 | Tag.prototype.detectOption = function () { 1889 | // console.log('find option'); 1890 | return this.button.type === 1 && this.optionText(); 1891 | }; 1892 | 1893 | Tag.prototype.defaultText = function () { 1894 | return this.button.placeholder || this.button.val || ''; 1895 | }; 1896 | 1897 | Tag.prototype.placeholderText = function () { 1898 | return this.button.placeholder ? ('\n(Default text [' + this.button.placeholder + '] will be removed automatically.)') : ''; 1899 | }; 1900 | 1901 | Tag.prototype.optionText = function () { 1902 | if (!WhutBB.e.macro && WhutBB.user.settings.prompt && this.button.noPrompt !== true) { 1903 | this.option = window.prompt((this.button.prompt || this.button.title) + this.placeholderText(), this.defaultText()); 1904 | } else { 1905 | this.option = this.defaultText(); 1906 | } 1907 | if (this.option === this.button.placeholder || this.option === '') { 1908 | this.option = false; 1909 | } 1910 | return true; 1911 | }; 1912 | 1913 | Tag.prototype.findType = function () { 1914 | return this.option === false ? 0 : this.button.type || 0; 1915 | }; 1916 | 1917 | Tag.prototype.update = function () { 1918 | this.detectOption(); 1919 | this.type = this.findType(); 1920 | return this; 1921 | }; 1922 | 1923 | return Tag; 1924 | 1925 | }()); 1926 | 1927 | WhutBB.init(); 1928 | WhutBB.factory(); 1929 | }()); 1930 | --------------------------------------------------------------------------------