├── js
├── testCase.js
├── i.js
├── gedrag.js
└── libs
│ ├── javascript.js
│ ├── codemirror-compressed.js
│ └── jquery-1.7.2.min.js
├── examples
├── template.js
├── examples.css
├── galFly
│ ├── index.html
│ ├── stijl.css
│ ├── gedrag.js
│ └── stringified.js
├── imgurOpen.js
├── twitter-hide.js
├── reddit.js
├── template.html
├── viewportMobile.js
├── removeWebArchiveHeader.js
├── youtube-timestamp.js
├── galNum
│ ├── index.html
│ ├── stijl.css
│ └── gedrag.js
├── showAlt.js
├── comoir.js
├── swfGet.js
├── layout-compare.js
├── hideliminator.js
├── link-github-package-json.js
├── minutedock.html
├── minutedock.js
├── galFly.js
├── galNum.js
├── download-torrent.js
└── openLinks.js
├── README
├── .gitignore
├── css
├── theme-default.css
├── stijl.css
└── codemirror.css
├── MIT-LICENSE.txt
└── index.html
/js/testCase.js:
--------------------------------------------------------------------------------
1 | // To be used inside the page itself, including this commentary
2 |
3 | $("body").css({"background-color":"red"}); // Do a barrel roll
4 | $('h1').css({'background-color':'green'});
5 | var texty = "This is so \"wrong\" that I wanna grab a \\ character and put it here";
6 | $('small').after(texty)
--------------------------------------------------------------------------------
/examples/template.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - Sitename - http://www.siteurl.com/ - *\
6 | |* - Comment - *|
7 | \* - v1.0 - */
8 |
9 |
10 | /* - /Sitename - */
11 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | From:
2 | http://mcdlr.com/
3 |
4 | See it live at:
5 | http://mcdlr.com/js-inject/
6 |
7 | With this tool creating a Bookmarklet is much easier. Just type the code, assign a name and an Anchor element with your code will be created below for you to drag to your bookmarks.
8 |
9 | You also have the possibility of adding jQuery to the target page so you can write you javascript using jQuery, just a checkbox away!
10 |
--------------------------------------------------------------------------------
/examples/examples.css:
--------------------------------------------------------------------------------
1 | html {
2 | font-size: 100%;
3 | }
4 | body {
5 | font-size: 2em;
6 | margin: 0;
7 | padding: 1em 0;
8 | font-family: Helvetica, Arial, sans-serif;
9 | text-align: center;
10 | }
11 | small {
12 | margin-top: 20%;
13 | }
14 | small + a {
15 | display: inline-block;
16 | width: 77%;
17 | margin: .2em 0;
18 | padding: 1em;
19 | font-size: 2em;
20 | color: #00f;
21 | background-color: #ddf;
22 | }
23 |
--------------------------------------------------------------------------------
/examples/galFly/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | galFly
5 |
6 |
7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 | ▲
16 | ▼
17 | 🔍
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/examples/imgurOpen.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - Imgur - http://imgur.com/gallery - *\
6 | |* - Open several images in new tabs - *|
7 | \* - v1.1 - */
8 |
9 |
10 | $('#imagelist .posts').find('a').each(function(e){
11 | if(e >= 50){
12 | return false;
13 | }
14 | var url = $(this).attr('href');
15 | window.open(url);
16 | });
17 |
18 |
19 | /* - /Imgur - */
20 |
--------------------------------------------------------------------------------
/js/i.js:
--------------------------------------------------------------------------------
1 | javascript:(function(){
2 |
3 | if (typeof ZHJ1bW1lcg === 'undefined') {
4 | var jQueryScript = document.createElement('script');
5 | jQueryScript.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js');
6 | var caput = document.getElementsByTagName('head');
7 | caput[0].appendChild(jQueryScript);
8 | ZHJ1bW1lcg = true;
9 | }
10 |
11 | setTimeout(function(){
12 | $(document).ready(function(){
13 | /* your jQuery code starts here */
14 |
15 |
16 |
17 | /* your jQuery code ends here */
18 | });
19 | },200);
20 |
21 | })();
22 |
--------------------------------------------------------------------------------
/examples/twitter-hide.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - Twitter - https://twitter.com/ - *\
6 | |* - Remove replies to other people on someone's timeline, - *|
7 | |* - akin to only seeing what you would see if you followed - *|
8 | |* - that person (to judge whether to follow or not) - *|
9 | \* - v1.0 - */
10 |
11 |
12 | $('head').append('')
13 |
14 |
15 | /* - /Twitter - */
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## OSX.gitignore
2 |
3 | .DS_Store
4 |
5 | # Thumbnails
6 | ._*
7 |
8 | # Files that might appear on external disk
9 | .Spotlight-V100
10 | .Trashes
11 |
12 |
13 | ## vim.gitignore
14 | .*.sw[a-z]
15 | *.un~
16 | Session.vim
17 |
18 |
19 | ## Archives.gitignore
20 |
21 | # It's better to unpack these files and commit the raw source because
22 | # git has its own built in compression methods.
23 | *.7z
24 | *.jar
25 | *.rar
26 | *.zip
27 | *.gz
28 | *.bzip
29 | *.xz
30 | *.lzma
31 |
32 | #packing-only formats
33 | *.iso
34 | *.tar
35 |
36 | #package management formats
37 | *.dmg
38 | *.xpi
39 | *.gem
40 | *.egg
41 | *.deb
42 | *.rpm
43 |
--------------------------------------------------------------------------------
/examples/reddit.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - reddit - http://www.reddit.com/ - *\
6 | |* - Open all submissions and comments visible - *|
7 | \* - v1.0 - */
8 |
9 |
10 | var entries = $('#siteTable').find('.entry');
11 |
12 | entries.each(function(){
13 | var I = $(this);
14 | var link = I.find('a.title').attr('href');
15 | var comments = I.find('a.comments').attr('href'); //remove this line if only want submissions
16 |
17 | window.open(comments); //remove this line if only want submissions
18 | window.open(link);
19 |
20 | });
21 |
22 |
23 | /* - /reddit - */
24 |
--------------------------------------------------------------------------------
/examples/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {nomen}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
19 |
20 | Drag the below link to your bookmarks
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/viewportMobile.js:
--------------------------------------------------------------------------------
1 | /* - These is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - viewportMobile - *\
6 | |* - Some sites don't allow you to zoom freely on mobile, probably because ads - *|
7 | |* - With this snippet you can recover your freedomz - *|
8 | \* - v1.0 - */
9 |
10 |
11 | var head = document.querySelector('head');
12 | var viewport = head.querySelector('meta[name="viewport"]');
13 | if(head.contains(viewport)){
14 | viewport.setAttribute('content', 'width=device-width, initial-scale=1');
15 | };
16 |
17 |
18 | /* - /viewportMobile - */
19 |
--------------------------------------------------------------------------------
/examples/removeWebArchiveHeader.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - Wayback Machine - https://web.archive.org/web/ - *\
6 | |* - Remove the header, for display purposes of old created sites - *|
7 | \* - v1.0 - */
8 |
9 |
10 | const webArchiveHead = document.querySelector('#wm-ipp');
11 |
12 | const removeUntilComment = elem => {
13 | const next = elem.nextSibling;
14 | if (next.nodeName === "#comment" && next.nodeValue === " END WAYBACK TOOLBAR INSERT ") {
15 | next.remove();
16 | } else {
17 | removeUntilComment(next);
18 | elem.remove();
19 | }
20 | };
21 |
22 | removeUntilComment(webArchiveHead);
23 |
24 |
25 | /* - /Wayback Machine - */
26 |
--------------------------------------------------------------------------------
/examples/youtube-timestamp.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - YouTube - https://www.youtube.com - *\
6 | |* - After pausing a long video, add timestamp to video - *|
7 | |* - (bookmarking, restarting computer) - *|
8 | \* - v1.0 - */
9 |
10 | var time = document
11 | .querySelector('.ytp-time-current')
12 | .textContent
13 | .split(':')
14 | .reverse();
15 |
16 | var timeUnit = ['s', 'm', 'h']
17 | var timeString = time
18 | .reduce((acc, curr, index) =>
19 | `${curr}${timeUnit[index]}${acc}`,'')
20 |
21 | window.location.assign(
22 | `${window
23 | .location
24 | .href
25 | .replace(/&t=.*$/, '')}&t=${timeString}`
26 | )
27 |
28 | /* - /YouTube - */
29 |
--------------------------------------------------------------------------------
/examples/galNum/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | galNum
5 |
6 |
7 |
8 |
9 |
10 |
24 |
25 |
26 |
27 |
28 | ▲
29 | ▼
30 | 🔍
31 |
32 |
33 |
34 |
35 |
36 |
37 |
40 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/css/theme-default.css:
--------------------------------------------------------------------------------
1 | .cm-s-default span.cm-keyword {color: #708;}
2 | .cm-s-default span.cm-atom {color: #219;}
3 | .cm-s-default span.cm-number {color: #164;}
4 | .cm-s-default span.cm-def {color: #00f;}
5 | .cm-s-default span.cm-variable {color: black;}
6 | .cm-s-default span.cm-variable-2 {color: #05a;}
7 | .cm-s-default span.cm-variable-3 {color: #0a5;}
8 | .cm-s-default span.cm-property {color: black;}
9 | .cm-s-default span.cm-operator {color: black;}
10 | .cm-s-default span.cm-comment {color: #a50;}
11 | .cm-s-default span.cm-string {color: #a11;}
12 | .cm-s-default span.cm-string-2 {color: #f50;}
13 | .cm-s-default span.cm-meta {color: #555;}
14 | .cm-s-default span.cm-error {color: #f00;}
15 | .cm-s-default span.cm-qualifier {color: #555;}
16 | .cm-s-default span.cm-builtin {color: #30a;}
17 | .cm-s-default span.cm-bracket {color: #cc7;}
18 | .cm-s-default span.cm-tag {color: #170;}
19 | .cm-s-default span.cm-attribute {color: #00c;}
20 |
--------------------------------------------------------------------------------
/examples/showAlt.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - showAlt - *\
6 | |* - Show alt text of img elements - *|
7 | \* - v0.1 - */
8 |
9 |
10 | (function(document){
11 |
12 | document.querySelector('head').insertAdjacentHTML('beforeEnd','');
13 |
14 | var imgs = Array.prototype.slice.call(document.querySelectorAll('img'));
15 |
16 | imgs.forEach(function(val, i, arr){
17 | var alt = val.getAttribute('alt');
18 | var title = val.getAttribute('title');
19 | if(alt){
20 | val.insertAdjacentHTML('afterEnd','alt = “'+alt+'”
');
21 | }
22 | if(title){
23 | val.insertAdjacentHTML('afterEnd','title = “'+title+'”
');
24 | }
25 | });
26 |
27 | })(document)
28 |
29 |
30 | /* - /Sitename - */
31 |
--------------------------------------------------------------------------------
/examples/comoir.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - Cómo ir - http://comoir.montevideo.gub.uy/stmWEB/ - *\
6 | |* - Make the map area significantly bigger - *|
7 | |* - Automatically fill departure point - *|
8 | |* - NOTE: Change {{address}} and {{number}} - *|
9 | \* - v1.0 - */
10 |
11 |
12 | var style = document.createElement('style');
13 | style.innerHTML = 'body > table {' +
14 | ' width: 94%;' +
15 | '}' +
16 | '#map {' +
17 | ' width: 100%;' +
18 | ' height: 640px;' +
19 | '}';
20 |
21 | var head = document.querySelector('head');
22 | head.appendChild(style);
23 |
24 | document.getElementById('form_input:panel_input_combinada:filtroGrupo').value = '{{address}}';
25 | document.getElementById('form_input:panel_input_combinada:filtroEsquina').value = '{{number}}';
26 | document.getElementById('form_input:panel_input_combinada:ido').onclick();
27 |
28 |
29 | /* - /Cómo ir - */
30 |
--------------------------------------------------------------------------------
/examples/swfGet.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - swfGet - *\
6 | |* - Open swf on the page on new tab - *|
7 | |* - Handy for playing games in full view - *|
8 | \* - v1.0 - */
9 |
10 |
11 | (function(window, document, undefined){
12 |
13 |
14 |
15 |
16 | var $ = function(selector){
17 | return Array.prototype.slice.call(document.querySelectorAll(selector));
18 | };
19 |
20 | var objects = $('object');
21 |
22 | if(objects.length){
23 | objects.forEach(function(element){
24 | var paramValue = element.querySelector('param[name="movie"]') ? element.querySelector('param[name="movie"]').getAttribute('value') : undefined;
25 | var embed = element.querySelector('embed') ? element.querySelector('embed').getAttribute('src') : undefined;
26 | var data = element.getAttribute('data');
27 | window.open(embed || paramValue || data);
28 | });
29 | }
30 |
31 |
32 |
33 |
34 | })(window, document);
35 |
36 |
37 |
38 | /* - /swfGet - */
39 |
--------------------------------------------------------------------------------
/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2012 Nicolas Barrera
2 | http://mcdlr.com/
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining
5 | a copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/css/stijl.css:
--------------------------------------------------------------------------------
1 | /* *\
2 | Styles by DrummerHead
3 | \* */
4 |
5 | body,
6 | html {
7 | margin: 0;
8 | padding: 0;
9 | font-family: courier, monospace;
10 | color: #222;
11 | background-color: #e1ffd3;
12 | }
13 | label[for='hasJQuery'] {
14 | float: right;
15 | margin: 0;
16 | }
17 | #hasJQuery {
18 | width: auto;
19 | height: 14px;
20 | float: right;
21 | margin: 1px 4px;
22 | }
23 | #container {
24 | width: 800px;
25 | margin: 0 auto;
26 | padding: .2em 0 2em;
27 | }
28 | label {
29 | display: block;
30 | margin: 16px 0 0 0;
31 | }
32 | textarea {
33 | width: 97%;
34 | height: 330px;
35 | padding: 12px 0 12px 12px;
36 | margin: 4px 0 0 0;
37 | }
38 | input {
39 | width: 600px;
40 | height: 25px;
41 | }
42 | input[type="submit"] {
43 | width: 180px;
44 | cursor: pointer;
45 | }
46 | small {
47 | margin-top: 25px;
48 | display: block;
49 | }
50 | #a-holder {
51 | height: 64px;
52 | margin: .5em 0;
53 | border: 1px solid #ddd;
54 | font-size: 2em;
55 | text-align: center;
56 | background-color: #f0fbe1;
57 | }
58 | #a-holder a {
59 | cursor: move;
60 | background-color: lightBlue;
61 | display: block;
62 | line-height: 1;
63 | padding: .5em;
64 | }
65 |
--------------------------------------------------------------------------------
/examples/layout-compare.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - layout-compare - any site - *\
6 | |* - Overlay an image to compare layout positioning - *|
7 | \* - v1.0 - */
8 |
9 |
10 | (function(window, document, undefined){
11 | 'use strict';
12 |
13 | var randomId = 'layout-compare-' + Math.random().toString(36).substr(2, 9);
14 | var imageStyles = 'position: absolute; top: 0; left: 0; opacity: .5';
15 |
16 | var createImageString = function(imageSrc, randomId, imageStyles){
17 | return ' ';
21 | };
22 |
23 | var askForImageSrc = function(){
24 | var src = prompt('Full URL of image source');
25 | return src;
26 | };
27 |
28 | var injectImage = function(imageSrc, randomId, imageStyles){
29 | document.body.insertAdjacentHTML(
30 | 'beforeend',
31 | createImageString(imageSrc, randomId, imageStyles)
32 | );
33 | };
34 |
35 | injectImage(askForImageSrc(), randomId, imageStyles);
36 |
37 | })(window, document);
38 |
39 |
40 | /* - /layout-compare - */
41 |
--------------------------------------------------------------------------------
/examples/galFly/stijl.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: sans-serif;
4 | text-align: center;
5 | }
6 | #gal {
7 | padding: 1em;
8 | margin: 0;
9 | list-style-type: none;
10 | }
11 | #gal li {
12 | min-height: "+innerHeight+"px;
13 | padding: 4em 0;
14 | }
15 | #gal img {
16 | display: block;
17 | max-width: 100%;
18 | margin: 0 auto;
19 | font-size: 3em;
20 | color: #ccc;
21 | }
22 | #gal a {
23 | display: inline-block;
24 | padding: 1em;
25 | text-decoration: none;
26 | color: #ccc;
27 | }
28 | #gal a:hover {
29 | color: #808080;
30 | text-decoration: underline;
31 | }
32 | #move {
33 | position: fixed;
34 | bottom: 0;
35 | left: 0;
36 | width: 5em;
37 | padding: 0;
38 | margin: 0;
39 | font-size: 1.4em;
40 | list-style-type: none;
41 | color: #888;
42 | -webkit-user-select: none;
43 | -moz-user-select: none;
44 | user-select: none;
45 | }
46 | #move li {
47 | float: left;
48 | width: 2.75em;
49 | height: 2em;
50 | line-height: 2em;
51 | cursor: pointer;
52 | }
53 | #move li:hover {
54 | color: #444;
55 | }
56 | #up,
57 | #down {
58 | text-indent: .5em;
59 | }
60 | #down {
61 | clear: left;
62 | }
63 | #move #zoom {
64 | width: 2em;
65 | text-indent: -.5em;
66 | }
67 | #more {
68 | padding: 1em;
69 | font-size: 1.5em;
70 | font-weight: bold;
71 | background-color: #eee;
72 | color: #888;
73 | cursor: pointer;
74 | }
75 | #more:hover {
76 | background-color: #ddd;
77 | color: #777;
78 | }
79 | #end {
80 | background-color: #ffb1ba;
81 | height: 10em;
82 | }
83 |
--------------------------------------------------------------------------------
/css/codemirror.css:
--------------------------------------------------------------------------------
1 | .CodeMirror {
2 | line-height: 1em;
3 | font-family: monospace;
4 | background-color: #fff;
5 | margin: 10px 0;
6 | }
7 |
8 | .CodeMirror-scroll {
9 | width: 100%
10 | height: auto;
11 | overflow-y: hidden;
12 | overflow-x: auto;
13 | min-height: 300px;
14 | }
15 |
16 | .CodeMirror-gutter {
17 | position: absolute; left: 0; top: 0;
18 | z-index: 10;
19 | background-color: #f7f7f7;
20 | border-right: 1px solid #eee;
21 | min-width: 2em;
22 | height: 100%;
23 | }
24 | .CodeMirror-gutter-text {
25 | color: #aaa;
26 | text-align: right;
27 | padding: .4em .2em .4em .4em;
28 | }
29 | .CodeMirror-lines {
30 | padding: .4em;
31 | }
32 |
33 | .CodeMirror pre {
34 | -moz-border-radius: 0;
35 | -webkit-border-radius: 0;
36 | -o-border-radius: 0;
37 | border-radius: 0;
38 | border-width: 0; margin: 0; padding: 0; background: transparent;
39 | font-family: inherit;
40 | font-size: inherit;
41 | padding: 0; margin: 0;
42 | white-space: pre;
43 | word-wrap: normal;
44 | }
45 |
46 | .CodeMirror textarea {
47 | font-family: inherit !important;
48 | font-size: inherit !important;
49 | }
50 |
51 | .CodeMirror-cursor {
52 | z-index: 10;
53 | position: absolute;
54 | visibility: hidden;
55 | border-left: 1px solid black !important;
56 | }
57 | .CodeMirror-focused .CodeMirror-cursor {
58 | visibility: visible;
59 | }
60 |
61 | span.CodeMirror-selected {
62 | background: #ccc !important;
63 | color: HighlightText !important;
64 | }
65 | .CodeMirror-focused span.CodeMirror-selected {
66 | background: Highlight !important;
67 | }
68 |
69 | .CodeMirror-matchingbracket {color: #0f0 !important;}
70 | .CodeMirror-nonmatchingbracket {color: #f22 !important;}
71 |
--------------------------------------------------------------------------------
/examples/hideliminator.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - Hideliminator - Any website - *\
6 | |* - Hide elements on command - *|
7 | \* - v2.0 - */
8 |
9 |
10 |
11 |
12 | (function(document){
13 |
14 |
15 | document.querySelector('head').insertAdjacentHTML('beforeEnd', '');
16 |
17 | var bod = document.body;
18 | var targetSuspect = function(event){
19 | event.target.classList.add('gun-point');
20 | };
21 | var dismissSuspect = function(event){
22 | event.target.classList.remove('gun-point');
23 | };
24 | var killSuspect = function(event){
25 | event.preventDefault();
26 | event.target.parentNode.removeChild(event.target);
27 | };
28 |
29 | bod.insertAdjacentHTML('beforeEnd','Stop judgement
');
30 |
31 | bod.addEventListener('mouseover', targetSuspect, false);
32 | bod.addEventListener('mouseout', dismissSuspect, false);
33 | bod.addEventListener('click', killSuspect, false);
34 |
35 | document.querySelector('#retirement').addEventListener('click', function(event){
36 | bod.removeEventListener('mouseover', targetSuspect, false);
37 | bod.removeEventListener('mouseout', dismissSuspect, false);
38 | bod.removeEventListener('click', killSuspect, false);
39 | this.parentNode.removeChild(this);
40 | });
41 |
42 |
43 | })(document)
44 |
45 |
46 |
47 |
48 |
49 | /* - /Hideliminator - */
50 |
--------------------------------------------------------------------------------
/examples/link-github-package-json.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - GitHub - https://github.com/any-repo/package.json - *\
6 | |* - Link package dependencies on a package.json to npm - *|
7 | \* - v1.0 - */
8 |
9 |
10 | const findParentBySelector = (elem, selector) => {
11 | const parent = elem.parentNode;
12 | if (parent.matches(selector)) {
13 | return parent;
14 | } else {
15 | return findParentBySelector(parent, selector);
16 | }
17 | };
18 |
19 | const isStartOfObject = (row) => /{/.test(row.textContent);
20 |
21 | const isEndOfObject = (row) => /}/.test(row.textContent);
22 |
23 | const linkToNMP = (tr) => {
24 | const packageEl = tr.querySelector('.pl-s:first-child');
25 | const packageText = packageEl.textContent;
26 | const packageName = packageText.replace(/["']*/g, '');
27 | packageEl.innerHTML = `${packageText} `;
28 | };
29 |
30 | const traverseTrs = (dep) => {
31 | const trFather = dep.matches('tr') ? dep : findParentBySelector(dep, 'tr');
32 | const trSibling = trFather.nextElementSibling;
33 |
34 | if(!isEndOfObject(trFather)){
35 | if(isStartOfObject(trFather)){
36 | traverseTrs(trSibling);
37 | } else {
38 | linkToNMP(trFather);
39 | traverseTrs(trSibling);
40 | }
41 | }
42 |
43 | };
44 |
45 | if (window.location.host === 'github.com' && window.location.pathname.endsWith('package.json')) {
46 | const deps = Array.from(document.querySelectorAll('.pl-s:first-child'))
47 | .filter((el, i) => /"(dev)?[Dd]ependencies"/.test(el.textContent));
48 | for(dep of deps){
49 | traverseTrs(dep);
50 | };
51 | } else {
52 | alert('This is not a package.json file on github.com');
53 | }
54 |
55 | /* - /GitHub - */
56 |
--------------------------------------------------------------------------------
/js/gedrag.js:
--------------------------------------------------------------------------------
1 | (function($){
2 |
3 |
4 |
5 |
6 | // Start codeMirror
7 | CodeMirror.fromTextArea(document.getElementById('codeInput'), {
8 | lineNumbers: true,
9 | matchBrackets: true
10 | });
11 |
12 |
13 | // Define DOM areas
14 | var $form = $('#magia')
15 | , $targetLink = $('#a-holder')
16 | , $codeOutput = $('#codeOutput')
17 | , $codeInput = $('#codeInput')
18 | , $linkName = $('#nome')
19 |
20 |
21 | // Make the form parse JS User Input
22 | $form.submit(function(e){
23 | e.preventDefault();
24 |
25 | var raw = $codeInput.val()
26 | , parsedJs = raw
27 | .replace(/\/\*[\s\S]*?\*\//g,'') // Delete block commentaries
28 | .replace(/(https?:)\/\//g,'$1aHR0cHMvLw') // Preserve URLs hack (no lookbehind in js)
29 | .replace(/\/\/.*/g,'') // Delete single line commentaries
30 | .replace(/aHR0cHMvLw/g,'//') // Return URL's //
31 | .replace(/%/g,'%25') // Safe porcentage
32 | .replace(/'/g,'%27') // Safe single quotes
33 | .replace(/"/g,'%22') // Safe double quotes
34 | .replace(/&/g,'%26') // Safe ampersand
35 | .replace(/[\r\n\t]/g,' ') // No newlines or tabs
36 | .replace(/ +/g,' ') // No extra spaces
37 | , nome = $linkName.val()
38 | , hasJq = $('#hasJQuery:checked').length
39 | , aHref = hasJq ?
40 | "javascript:(function(){if(typeof ZHJ1bW1lcg === 'undefined'){var jQueryScript=document.createElement('script');jQueryScript.setAttribute('src','//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');var caput=document.getElementsByTagName('head');caput[0].appendChild(jQueryScript);ZHJ1bW1lcg=true;}setTimeout(function(){$(document).ready(function(){"+ parsedJs +"});},200);})();"
41 | :
42 | "javascript:(function(){"+ parsedJs +"})();"
43 | , aElement = ''+nome+' '
44 |
45 | $targetLink.empty().append(aElement);
46 | $codeOutput.empty().text(aElement)
47 | });
48 |
49 |
50 |
51 |
52 | })(jQuery)
53 |
--------------------------------------------------------------------------------
/examples/galNum/stijl.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: sans-serif;
3 | margin: 0;
4 | }
5 | header {
6 | background-color: #eee;
7 | }
8 | .vessel {
9 | max-width: 40em;
10 | margin: 0 auto;
11 | padding: 1em 0;
12 | }
13 | #hb {
14 | font-size: 1.2em;
15 | }
16 | #hb span {
17 | color: #808080;
18 | }
19 | #hb b {
20 | color: #444;
21 | cursor: pointer;
22 | }
23 | #hb.done b {
24 | color: #808080;
25 | cursor: auto;
26 | font-weight: normal;
27 | }
28 | #hb b.s {
29 | color: #444;
30 | cursor: auto;
31 | font-weight: bold;
32 | }
33 | form {
34 | display: none;
35 | margin-top: 1em;
36 | }
37 | .v {
38 | display: block;
39 | }
40 | main,
41 | #move {
42 | text-align: center;
43 | }
44 | #gal {
45 | padding: 1em;
46 | margin: 0;
47 | list-style-type: none;
48 | }
49 | #gal li {
50 | min-height: "+innerHeight+"px;
51 | padding: 4em 0;
52 | }
53 | #gal img {
54 | display: block;
55 | max-width: 100%;
56 | margin: 0 auto;
57 | font-size: 3em;
58 | color: #ccc;
59 | }
60 | #gal a {
61 | display: inline-block;
62 | padding: 1em;
63 | text-decoration: none;
64 | color: #ccc;
65 | }
66 | #gal a:hover {
67 | color: #808080;
68 | text-decoration: underline;
69 | }
70 | #move {
71 | position: fixed;
72 | bottom: 0;
73 | left: 0;
74 | width: 5em;
75 | padding: 0;
76 | margin: 0;
77 | font-size: 1.4em;
78 | list-style-type: none;
79 | color: #888;
80 | -webkit-user-select: none;
81 | -moz-user-select: none;
82 | user-select: none;
83 | }
84 | #move li {
85 | float: left;
86 | width: 2.75em;
87 | height: 2em;
88 | line-height: 2em;
89 | cursor: pointer;
90 | }
91 | #move li:hover {
92 | color: #444;
93 | }
94 | #up,
95 | #down {
96 | text-indent: .5em;
97 | }
98 | #down {
99 | clear: left;
100 | }
101 | #move #zoom {
102 | width: 2em;
103 | text-indent: -.5em;
104 | }
105 | #more {
106 | padding: 1em;
107 | font-size: 1.5em;
108 | font-weight: bold;
109 | background-color: #eee;
110 | color: #888;
111 | cursor: pointer;
112 | }
113 | #more:hover {
114 | background-color: #ddd;
115 | color: #777;
116 | }
117 |
--------------------------------------------------------------------------------
/examples/minutedock.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | timeBar
5 |
6 |
7 |
8 |
9 |
10 |
11 |
19 |
20 | Drag the below link to your bookmarks
21 | timeBar
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | JS inject · mcdlr
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
30 |
31 |
JS inject
32 |
Here you can create a Bookmarklet in an easy way. Just type the code that you want executed and the link will be generated for you to drag to your Bookmarks bar.
33 |
You also have a jQuery script injection if you want to work with jQuery regardless of it being present on the target page. Just tick the checkbox to have it.
34 |
35 |
44 |
45 |
Drag the Bookmarklet that will appear here to your bookmarks bar and then use it in any page you want
46 |
47 |
Interested in injecting some CSS instead? You should check CSS Inject !
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/examples/minutedock.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - MinuteDock - http://minutedock.com/ - *\
6 | |* - Add timeBar to visualize progress on Goals - *|
7 | \* - v1.4 - */
8 |
9 |
10 |
11 |
12 | var today = new Date()
13 | , todayStarted = new Date().setHours(0, 0, 0, 0)
14 |
15 | , miliInADay = 86400000
16 | , miliInAWorkingWeek = miliInADay * 5
17 | , miliInAMonth = miliInADay * 30
18 |
19 | , rightNow = today.getTime()
20 | , miliElapsedToday = rightNow - todayStarted
21 | , dayPercentage = miliElapsedToday * 100 / miliInADay
22 |
23 | , weekDay = (today.getDay() + 6) %7
24 | , weekDayMili = weekDay * miliInADay
25 | , miliElapsedInWeek = weekDayMili + miliElapsedToday
26 | , weekPercentageOverflow = miliElapsedInWeek * 100 / miliInAWorkingWeek
27 | , weekPercentage = ( weekPercentageOverflow < 100 ? weekPercentageOverflow : 100 )
28 |
29 | , monthFirstDay = today.setDate(1)
30 | , monthBegins = today.setHours(0, 0, 0, 0)
31 | , monthNow = rightNow - monthBegins
32 | , monthPercentage = monthNow * 100 / miliInAMonth
33 |
34 | , $brief = $$('.brief')
35 | , regexMonthly = /monthly/
36 | , regexWeekly = /weekly/
37 | , regexDaily = /daily/
38 | ;
39 |
40 |
41 | /* * /
42 | console.log('rightNow = ' + rightNow + ' - ' + new Date(rightNow));
43 | console.log('todayStarted = ' + todayStarted + ' - ' + new Date(todayStarted));
44 | console.log('miliElapsedToday = ' + miliElapsedToday + ' - ' + new Date(miliElapsedToday));
45 | console.log('dayPercentage = ' + dayPercentage);
46 |
47 | console.log('weekDay = ' + weekDay);
48 | console.log('weekDayMili = ' + weekDayMili + ' - ' + new Date(weekDayMili));
49 | console.log('miliElapsedInWeek = ' + miliElapsedInWeek + ' - ' + new Date(miliElapsedInWeek));
50 | console.log('weekPercentage = ' + weekPercentage);
51 |
52 | console.log('monthFirstDay = ' + monthFirstDay + ' - ' + new Date(monthFirstDay));
53 | console.log('monthBegins = ' + monthBegins + ' - ' + new Date(monthBegins));
54 | console.log('rightNow = ' + rightNow + ' - ' + new Date(rightNow));
55 | console.log('monthNow = ' + monthNow + ' - ' + new Date(monthNow));
56 | console.log('monthPercentage = ' + monthPercentage);
57 | /* */
58 | //console.log('x = ' + x + ' - ' + new Date(x));
59 |
60 |
61 | var makeTimeBar = function(percentageDelta, isWorkAboveTime, timePercentage){
62 | var barHTML = '';
63 | return barHTML
64 | };
65 |
66 |
67 | $brief.each(function(el){
68 | var periodText = el.down('.normal .period').textContent.strip()
69 | , $progressBarTrack = el.down('.progress_bar_track')
70 | , $progress = el.down('.progress')
71 | , progressPercentage = ( $progress ? parseInt(el.down('.progress').getStyle('width')) : 0 )
72 | , isMonth = regexMonthly.test(periodText)
73 | , isWeek = regexWeekly.test(periodText)
74 | , isDay = regexDaily.test(periodText)
75 | , timePercentage
76 | ;
77 |
78 | if(isMonth){
79 | timePercentage = monthPercentage
80 | }
81 | else if(isWeek){
82 | timePercentage = weekPercentage
83 | }
84 | else if(isDay){
85 | timePercentage = dayPercentage
86 | }
87 |
88 | var isWorkAboveTime = progressPercentage >= timePercentage
89 | , percentageDelta = (progressPercentage - timePercentage).toFixed(1)
90 | ;
91 |
92 | $progressBarTrack.insert({after : makeTimeBar(percentageDelta, isWorkAboveTime, timePercentage)});
93 | });
94 |
95 |
96 |
97 |
98 | /* - /MinuteDock - */
99 |
--------------------------------------------------------------------------------
/examples/galFly/gedrag.js:
--------------------------------------------------------------------------------
1 | (function(document, stringified){
2 |
3 |
4 |
5 | // Helper functions
6 | //
7 | var $ = function(element){
8 | return document.querySelector(element)
9 | };
10 |
11 |
12 | // Features common to galFly and galNum
13 | //
14 | var galCommons = (function(){
15 | return {
16 | defaultShift: 25,
17 | currentImage: 0,
18 | minImage: 0,
19 | maxImage: this.defaultShift,
20 |
21 | init: function(galWidthElement){
22 | var _this = this;
23 | _this.galWidth = parseInt(getComputedStyle(galWidthElement).getPropertyValue('width'), 10);
24 | onkeypress = function(e){
25 | if(e.charCode == 106){
26 | _this.goToImage(true);
27 | }
28 | else if(e.charCode == 107){
29 | _this.goToImage(false);
30 | }
31 | else if(e.charCode == 108){
32 | _this.zoom($('#a' + _this.currentImage));
33 | }
34 | };
35 | $('#down').addEventListener('click', function(){
36 | _this.goToImage(true);
37 | });
38 | $('#up').addEventListener('click', function(){
39 | _this.goToImage(false);
40 | });
41 | $('#zoom').addEventListener('click', function(){
42 | _this.zoom($('#a' + _this.currentImage));
43 | });
44 | },
45 |
46 | goToImage: function(isGoingDown){
47 | if(isGoingDown){
48 | if((this.currentImage + 1) >= this.maxImage){
49 | scrollTo(0, document.body.scrollHeight);
50 | }
51 | else{
52 | scrollTo(0, $('#a' + ++this.currentImage).offsetTop - 5);
53 | }
54 | }
55 | else{
56 | if((this.currentImage - 1) >= this.minImage){
57 | scrollTo(0, $('#a' + --this.currentImage).offsetTop - 5);
58 | }
59 | }
60 | },
61 |
62 | zoom: function(el){
63 | var t = el.currentTarget || el;
64 | var newWidth = t.naturalWidth * (t.ct + 1);
65 | if(newWidth <= this.galWidth){
66 | t.ct++;
67 | t.setAttribute('style', 'width:' + newWidth + 'px;height:' + t.naturalHeight * t.ct + 'px');
68 | }
69 | else{
70 | t.ct = 0;
71 | t.setAttribute('style', 'width:100%');
72 | }
73 | },
74 |
75 | bindResize: function(imgs){
76 | for(var i = 0; i < imgs.length; i++){
77 | var I = imgs.item(i);
78 | I.ct = 1;
79 | I.addEventListener('click', this.zoom.bind(this));
80 | }
81 | }
82 | }
83 | })();
84 |
85 |
86 | // Selector variables and source of data
87 | //
88 | var $gal = $('#gal');
89 | var imageLinks = JSON.parse(stringified);
90 | var increase = galCommons.defaultShift;
91 |
92 |
93 | // Specifics of galFly related to creating the gallery and injecting
94 | //
95 | var createGal = function(start){
96 | var galleryHTML = $gal.innerHTML = '';
97 | galCommons.currentImage = galCommons.minImage = start;
98 |
99 | if(imageLinks.length > increase){
100 | for(var i = start; i < start + galCommons.defaultShift; i++){
101 | galleryHTML += imageLinks[i];
102 | }
103 | increase += galCommons.defaultShift;
104 | galCommons.maxImage = start + galCommons.defaultShift;
105 |
106 | $gal.insertAdjacentHTML('afterEnd', 'Load more
');
107 | $('#more').addEventListener('click', function(){
108 | scrollTo(0, 0);
109 | this.outerHTML = '';
110 | createGal(start + galCommons.defaultShift);
111 | });
112 | }
113 | else {
114 | for(var i = start; i < imageLinks.length; i++){
115 | galleryHTML += imageLinks[i];
116 | }
117 | galCommons.maxImage = imageLinks.length;
118 | $gal.insertAdjacentHTML('afterEnd', '
');
119 | }
120 |
121 | $gal.innerHTML = galleryHTML;
122 | galCommons.bindResize(document.querySelectorAll('img'));
123 | };
124 |
125 |
126 | galCommons.init($gal);
127 |
128 | createGal(0);
129 |
130 |
131 |
132 |
133 | })(document, stringified)
134 |
--------------------------------------------------------------------------------
/examples/galFly.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - galFly - *\
6 | |* - Render linked images from current page, move with j & k, - *|
7 | |* - increase image size by clicking the image - *|
8 | \* - v2.6 - */
9 |
10 |
11 |
12 |
13 | var imgs = Array.prototype.filter.call(document.links, function(val){
14 | return /\.(jpe?g|gif|png|tiff|svg)(\?.*)?$/i.test(val.href);
15 | });
16 |
17 | var noRepeats = [];
18 |
19 | for(var i = 0; i < imgs.length; i++){
20 | if(imgs[i].href !== imgs[(i+1) % imgs.length].href){
21 | noRepeats.push(imgs[i])
22 | }
23 | }
24 |
25 | var lis = noRepeats.map(function(val, i){
26 | return '' + val.textContent + ' ';
27 | });
28 |
29 | var stringified = JSON.stringify(lis).replace(/\\/g, '\\\\').replace(/'/g, '\\\'');
30 |
31 | var css = "body{margin:0;font-family:sans-serif;text-align:center}#gal{padding:1em;margin:0;list-style-type:none}#gal li{min-height:"+innerHeight+"px;padding:4em 0}#gal img{display:block;max-width:100%;margin:0 auto;font-size:3em;color:#ccc}#gal a{display:inline-block;padding:1em;text-decoration:none;color:#ccc}#gal a:hover{color:gray;text-decoration:underline}#move{position:fixed;bottom:0;left:0;width:5em;padding:0;margin:0;font-size:1.4em;list-style-type:none;color:#888;-webkit-user-select:none;-moz-user-select:none;user-select:none}#move li{float:left;width:2.75em;height:2em;line-height:2em;cursor:pointer}#move li:hover{color:#444}#down,#up{text-indent:.5em}#down{clear:left}#move #zoom{width:2em;text-indent:-.5em}#more{padding:1em;font-size:1.5em;font-weight:700;background-color:#eee;color:#888;cursor:pointer}#more:hover{background-color:#ddd;color:#777}#end{background-color:#ffb1ba;height:10em}";
32 |
33 | var js = '!function(t,e){var n=function(e){return t.querySelector(e)},i=function(){return{defaultShift:25,currentImage:0,minImage:0,maxImage:this.defaultShift,init:function(t){var e=this;e.galWidth=parseInt(getComputedStyle(t).getPropertyValue("width"),10),onkeypress=function(t){106==t.charCode?e.goToImage(!0):107==t.charCode?e.goToImage(!1):108==t.charCode&&e.zoom(n("#a"+e.currentImage))},n("#down").addEventListener("click",function(){e.goToImage(!0)}),n("#up").addEventListener("click",function(){e.goToImage(!1)}),n("#zoom").addEventListener("click",function(){e.zoom(n("#a"+e.currentImage))})},goToImage:function(t){t?this.currentImage+1>=this.maxImage?scrollTo(0,scrollMaxY):scrollTo(0,n("#a"+ ++this.currentImage).offsetTop-5):this.currentImage-1>=this.minImage&&scrollTo(0,n("#a"+--this.currentImage).offsetTop-5)},zoom:function(t){var e=t.currentTarget||t,n=e.naturalWidth*(e.ct+1);n<=this.galWidth?(e.ct++,e.setAttribute("style","width:"+n+"px;height:"+e.naturalHeight*e.ct+"px")):(e.ct=0,e.setAttribute("style","width:100%"))},bindResize:function(t){for(var e=0;eo){for(var u=e;uLoad more\'),n("#more").addEventListener("click",function(){scrollTo(0,0),this.outerHTML="",c(e+i.defaultShift)})}else{for(var u=e;u\')}r.innerHTML=s,i.bindResize(t.querySelectorAll("img"))};i.init(r),c(0)}(document,stringified)';
34 |
35 | var html = "galFly ▲ ▼ 🔍 ";
40 |
41 | // window.open('data:text/html,' + encodeURIComponent(html));
42 | document.write(html);
43 | document.close();
44 |
45 |
46 |
47 |
48 | /* - /galFly - */
49 |
--------------------------------------------------------------------------------
/examples/galNum.js:
--------------------------------------------------------------------------------
1 | /* - This is a javascript snippet to be used with
2 | http://mcdlr.com/js-inject/ - */
3 |
4 |
5 | /* - galNum - *\
6 | |* - Create numbered sequence of images based on current one, - *|
7 | |* - Similar to http://mcdlr.com/gal/ but better - *|
8 | \* - v2.2 - */
9 |
10 |
11 |
12 |
13 | var css = "body{font-family:sans-serif;margin:0}header{background-color:#eee}.vessel{max-width:40em;margin:0 auto;padding:1em 0}#hb{font-size:1.2em}#hb span{color:gray}#hb b{color:#444;cursor:pointer}#hb.done b{color:gray;cursor:auto;font-weight:400}#hb b.s{color:#444;cursor:auto;font-weight:700}form{display:none;margin-top:1em}.v{display:block}#move,main{text-align:center}#gal{padding:1em;margin:0;list-style-type:none}#gal li{min-height:"+innerHeight+"px;padding:4em 0}#gal img{display:block;max-width:100%;margin:0 auto;font-size:3em;color:#ccc}#gal a{display:inline-block;padding:1em;text-decoration:none;color:#ccc}#gal a:hover{color:gray;text-decoration:underline}#move{position:fixed;bottom:0;left:0;width:5em;padding:0;margin:0;font-size:1.4em;list-style-type:none;color:#888;-webkit-user-select:none;-moz-user-select:none;user-select:none}#move li{float:left;width:2.75em;height:2em;line-height:2em;cursor:pointer}#move li:hover{color:#444}#down,#up{text-indent:.5em}#down{clear:left}#move #zoom{width:2em;text-indent:-.5em}#more{padding:1em;font-size:1.5em;font-weight:700;background-color:#eee;color:#888;cursor:pointer}#more:hover{background-color:#ddd;color:#777}";
14 |
15 | var js = '!function(t,e){var n,i=function(e){return t.querySelector(e)},r=function(t){return parseInt(t,10)},a=function(){return{defaultShift:25,currentImage:0,minImage:0,maxImage:this.defaultShift,init:function(t){var e=this;e.galWidth=parseInt(getComputedStyle(t).getPropertyValue("width"),10),onkeypress=function(t){106==t.charCode?e.goToImage(!0):107==t.charCode?e.goToImage(!1):108==t.charCode&&e.zoom(i("#a"+e.currentImage))},i("#down").addEventListener("click",function(){e.goToImage(!0)}),i("#up").addEventListener("click",function(){e.goToImage(!1)}),i("#zoom").addEventListener("click",function(){e.zoom(i("#a"+e.currentImage))})},goToImage:function(t){t?this.currentImage+1>=this.maxImage?scrollTo(0,scrollMaxY):scrollTo(0,i("#a"+ ++this.currentImage).offsetTop-5):this.currentImage-1>=this.minImage&&scrollTo(0,i("#a"+--this.currentImage).offsetTop-5)},zoom:function(t){var e=t.currentTarget||t,n=e.naturalWidth*(e.ct+1);n<=this.galWidth?(e.ct++,e.setAttribute("style","width:"+n+"px;height:"+e.naturalHeight*e.ct+"px")):(e.ct=0,e.setAttribute("style","width:100%"))},bindResize:function(t){for(var e=0;e\',u=/^0*/.test(e),d=a.maxImage=r(e)+r(o);a.currentImage=a.minImage=r(e);for(var m=r(e);d>m;m++){var h=u?f(m,e.length):m,v=n[0]+h+n[1];s+=\'\'+v+" "}s+="",l.innerHTML=s,l.insertAdjacentHTML("beforeEnd",\'Load more
\'),i("#more").addEventListener("click",function(){scrollTo(0,0);var t=u?f(d,e.length):d;c.value=t,g(t,o)}),a.bindResize(t.querySelectorAll("img"))};for(part in m){var v=m[part];d+=v.isN?\'\'+v.prt+" ":""+v.prt+" "}o.innerHTML=d;for(var p=t.querySelectorAll("#hb b"),I=0;I▲ ▼ 🔍