Last active
October 30, 2024 06:27
-
-
Save xim/9ca907c77abf0687d1beac910888966d to your computer and use it in GitHub Desktop.
Revisions
-
xim revised this gist
Oct 30, 2024 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ // ==UserScript== // @name Mangaread/nightcomic/manhuafast page gap toggler // @namespace https://gist.github.com/xim // @version 2024-10-30 // @description Running this toggles the "no-gap" css class on all .page-break page elements and persists per manga // @author xim // @match https://www.mangaread.org/* // @match https://www.nightcomic.com/* // @match https://manhuafast.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=mangaread.org // @downloadURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js // @updateURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js -
xim revised this gist
Jan 29, 2024 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,11 @@ // ==UserScript== // @name Mangaread/nightcomic page gap toggler // @namespace https://gist.github.com/xim // @version 2024-01-29 // @description Running this toggles the "no-gap" css class on all .page-break page elements and persists per manga // @author xim // @match https://www.mangaread.org/* // @match https://www.nightcomic.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=mangaread.org // @downloadURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js // @updateURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js -
xim revised this gist
Jan 27, 2024 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,13 @@ // ==UserScript== // @name Mangaread.org page gap toggler // @namespace https://gist.github.com/xim // @version 2024-01-27 // @description Running this toggles the "no-gap" css class on all .page-break page elements and persists per manga // @author xim // @match https://www.mangaread.org/* // @icon https://www.google.com/s2/favicons?sz=64&domain=mangaread.org // @downloadURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js // @updateURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js // @grant GM_getValue // @grant GM_setValue // ==/UserScript== -
xim revised this gist
Jan 27, 2024 . 1 changed file with 24 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,36 +7,55 @@ // @match https://www.mangaread.org/* // @icon https://www.google.com/s2/favicons?sz=64&domain=mangaread.org // @downloadURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js // @updateURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js // @grant GM_getValue // @grant GM_setValue // ==/UserScript== function do_toggle(gap) { var pages = document.getElementsByClassName('page-break'); for (const page of pages) { if (gap) { page.classList.remove('no-gaps'); } else { page.classList.add('no-gaps'); } } } function toggle_gap(manga) { var data = JSON.parse(GM_getValue('pageGaps', '{}')); const gap = !data[manga]; do_toggle(gap); data[manga] = gap; GM_setValue('pageGaps', JSON.stringify(data)); } (function() { 'use strict'; const manga = window.location.pathname.split('/')[2]; if (!manga) { return; } var icon = document.createElement('i'); icon.classList.add('icon'); icon.classList.add('ion-logo-javascript'); var link = document.createElement('a'); link.classList.add('wp-manga-action-button'); link.onclick = () => { toggle_gap(manga) }; link.appendChild(icon); var li = document.createElement('li'); li.appendChild(link); var list = document.getElementsByClassName('action_list_icon')[0]; list.appendChild(li); const data = JSON.parse(GM_getValue('pageGaps', "{}")); if (data[manga]) { do_toggle(true); } })(); -
xim renamed this gist
Jan 17, 2024 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ // @author xim // @match https://www.mangaread.org/* // @icon https://www.google.com/s2/favicons?sz=64&domain=mangaread.org // @downloadURL https://gist.github.com/xim/9ca907c77abf0687d1beac910888966d/raw/mangaread-page-gap-toggler.user.js // @grant none // ==/UserScript== -
xim created this gist
Jan 17, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ // ==UserScript== // @name Mangaread.org page gap toggler // @namespace https://gist.github.com/xim // @version 2024-01-17 // @description Running this toggles the "no-gap" css class on all .page-break page elements // @author xim // @match https://www.mangaread.org/* // @icon https://www.google.com/s2/favicons?sz=64&domain=mangaread.org // @grant none // ==/UserScript== function toggle_gap() { var pages = document.getElementsByClassName('page-break'); for (const page of pages) { if (page.classList.contains('no-gaps')) { page.classList.remove('no-gaps'); } else { page.classList.add('no-gaps'); } } } (function() { 'use strict'; var icon = document.createElement('i'); icon.classList.add('icon'); icon.classList.add('ion-logo-javascript'); var link = document.createElement('a'); link.classList.add('wp-manga-action-button'); link.onclick = toggle_gap; link.appendChild(icon); var li = document.createElement('li'); li.appendChild(link); var list = document.getElementsByClassName('action_list_icon')[0]; list.appendChild(li); //node.parentElement.insertBefore(new_el, node); })();