(function(){
var defaultSettings = {
prefetchNext: 5, //number of prefetched pages ahead
prefetchBack: 5, //number of prefetched pages behind
prefetchNextStart: 2, //number of prefetched pages ahead when the script starts
prefetchBackStart: 1, //number of prefetched pages behind when the script starts
prefetchNoNext: true, //specifies if previous page should be prefetched when theres no next page
fullLayout: true, //true for full layout mode, false for minimalistic mode
clickImgNavigates: true, //specifies if clicking the image will change pages
clikLeftHalfGoesBack: true, //specifies if clicking the left half of the image will take you to the previous page
flipControlsManga: false, //flip the controls (L/R arrows, L/R image click, back/next buttons) for mangas or other right-to-left content
autozoom: false, //enable fit-to-screen
shrinkWidth: false, //when fit-to-screen enabled and image too wide, shrink it
shrinkHeight: false, //when fit-to-screen enabled and image too long, shrink it
expandWidth: false, //when fit-to-screen enabled and image too narrow, expand it
expandHeight: false, //when fit-to-screen enabled and image too short, expand it
showButtons: true, //show or hide the buttons (back/next, bookmarks, settings, etc...)
borderLR: 0, //pixels to leave as border to the sides of the image when zooming and scrolling
borderUD: 0, //pixels to leave as border above and below the image when zooming and scrolling
goToBookmark: true, //if you have 1 bookmark saved for a site, asks you if you want to go there when you visit the site
moveWhileLoading: false, //lets you change pages even if the image for the next page is still loading
debugMode: false, //alerts on errors, and shows some of the currently cache'd pages/images with the "," key
showSettingsOnFail: false, //if no settings are found for this site and default ones didn't work, show settings screen
keyboardShortcuts: { //keyboard shortcuts...
back: {name: 'LEFT', keyCode: 37, ctrlKey: false, shiftKey: false, altKey: false},
next: {name: 'RIGHT', keyCode: 39, ctrlKey: false, shiftKey: false, altKey: false},
scroll_left: {name: 'CTRL + LEFT', keyCode: 37, ctrlKey: true, shiftKey: false, altKey: false},
scroll_right: {name: 'CTRL + RIGHT', keyCode: 39, ctrlKey: true, shiftKey: false, altKey: false},
scroll_up: {name: 'CTRL + UP', keyCode: 38, ctrlKey: true, shiftKey: false, altKey: false},
scroll_down: {name: 'CTRL + DOWN', keyCode: 40, ctrlKey: true, shiftKey: false, altKey: false},
reload: {name: '.', keyCode: 190, ctrlKey: false, shiftKey: false, altKey: false},
set_bm: {name: 'CTRL + ALT + B', keyCode: 66, ctrlKey: true, shiftKey: false, altKey: true},
add_bm: {name: 'CTRL + ALT + A', keyCode: 65, ctrlKey: true, shiftKey: false, altKey: true},
layout: {name: '-', keyCode: isWebKit() ? 189 : 173, ctrlKey: false, shiftKey: false, altKey: false},
botones: {name: 'SHIFT + -', keyCode: isWebKit() ? 189 : 173, ctrlKey: false, shiftKey: true, altKey: false},
fit: {name: '+', keyCode: isWebKit() ? 187 : 171, ctrlKey: false, shiftKey: false, altKey: false},
slide: {name: 'CTRL + ALT + S', keyCode: 83, ctrlKey: true, shiftKey: false, altKey: true},
debug_mode: {name: 'CTRL + ALT + X', keyCode: 88, ctrlKey: true, shiftKey: false, altKey: true},
debug_info: {name: ',', keyCode: 188, ctrlKey: false, shiftKey: false, altKey: false}
}
};
// ==UserScript==
// @name Webcomic Reader
// @author ameboide
// @version 2015.03.27
// @namespace http://userscripts.org/scripts/show/59842
// @description Can work on almost any webcomic/manga page, preloads 5 or more pages ahead (or behind), navigates via ajax for instant-page-change, lets you use the keyboard, remembers your progress, and it's relatively easy to add new sites
// @lastchanges added 2 sites, fixed 6 more
// @updatetype 24
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// @grant GM_openInTab
// @include http://www.sluggy.com/*
// @include http://sluggy.com/*
// @include http://www.penny-arcade.com/comic*
// @include http://penny-arcade.com/comic*
// @include http://www.xkcd.com/*
// @include http://xkcd.com/*
// @include http://www.xkcd.org/*
// @include http://xkcd.org/*
// @include http://www.xkcd.net/*
// @include http://xkcd.net/*
// @include https://www.xkcd.com/*
// @include https://xkcd.com/*
// @include http://www.giantitp.com/*
// @include http://www.dilbert.com/strip/*
// @include http://dilbert.com/strip/*
// @include http://hf.dilbert.com/strip/*
// @include http://www.explosm.net/*
// @include http://explosm.net/*
// @include http://www.nuklearpower.com/*
// @include http://www.reallifecomics.com/*
// @include http://reallifecomics.com/*
// @include http://www.pvponline.com/*
// @include http://pvponline.com/*
// @include http://www.brawlinthefamily.com/*
// @include http://drmcninja.com/*
// @include http://www.vgcats.com/*/*
// @include http://www.phdcomics.com/*
// @include http://www.cad-comic.com/*
// @include http://www.smbc-comics.com/*
// @include http://abstrusegoose.com/*
// @include http://thedoghousediaries.com/*
// @include http://www.erfworld.com/*
// @include http://es.juanelo.net/*/*
// @include http://www.mangastream.com/*
// @include http://mangastream.com/*
// @include http://readms.com/*
// @include http://www.qwantz.com/*
// @include http://qwantz.com/*
// @include http://www.2pstart.com/*/*
// @include http://www.spaceavalanche.com/*
// @include http://www.gunshowcomic.com/*
// @include http://gunshowcomic.com/*
// @include http://www.terrorisland.net/*
// @include http://nedroid.com/*
// @include http://manga.animea.net/*
// @include http://www.bobandgeorge.com/*
// @include http://bobandgeorge.com/*
// @include http://www.shamusyoung.com/*
// @include http://www.stationv3.com/*
// @include http://www.lfgcomic.com/page/*
// @include http://lfgcomic.com/page/*
// @include http://www.gpf-comics.com/*
// @include http://www.questionablecontent.net/*
// @include http://questionablecontent.net/*
// @include http://miscellanea.wellingtongrey.net/*
// @include http://www.daisyowl.com/*
// @include http://daisyowl.com/*
// @include http://www.hyperdeathbabies.com/*
// @include http://www.kyo.cn/Viewcartoon/*
// @include http://www.mangatoshokan.com/*
// @include http://amultiverse.com/*
// @include http://wondermark.com/*
// @include http://www.amazingsuperpowers.com/*
// @include http://www.anymanga.com/*
// @include http://anymanga.com/*
// @include http://mangafox.me/*
// @include http://www.leasticoulddo.com/*
// @include http://leasticoulddo.com/*
// @include http://www.sinfest.net/*
// @include http://www.crfh.net/*
// @include http://crfh.net/*
// @include http://www.pennyandaggie.com/*
// @include http://pennyandaggie.com/*
// @include http://www.darkbolt.com/*
// @include http://darkbolt.com/*
// @include http://www.egscomics.com/*
// @include http://egscomics.com/*
// @include http://www.the-gutters.com/*
// @include http://www.punchanpie.net/*
// @include http://punchanpie.net/*
// @include http://noneedforbushido.com/*
// @include http://www.teahousecomic.com/*
// @include http://www.applegeeks.com/*
// @include http://applegeeks.com/*
// @include http://www.mangareader.net/*
// @include http://stoptazmo.com/*
// @include http://www.arcamax.com/*
// @include http://www.nettserier.no/*
// @include http://nettserier.no/*
// @include http://disneycomics.free.fr/*/show.php?*
// @include http://www.nerfnow.com/*
// @include http://nerfnow.com/*
// @exclude http://www.nerfnow.com/*/comments*
// @exclude http://nerfnow.com/*/comments*
// @include http://www.virtualshackles.com/*
// @include http://www.little-gamers.com/*
// @include http://www.digitalunrestcomic.com/*
// @include http://digitalunrestcomic.com/*
// @include http://www.duelinganalogs.com/*
// @include http://www.actiontrip.com/*
// @include http://actiontrip.com/*
// @include http://www.myextralife.com/*
// @include http://www.mondaynightcrew.com/*
// @include http://mondaynightcrew.com/*
// @include http://notinventedhe.re/*
// @include http://www.unshelved.com/*
// @include https://www.eviscerati.org/comics*
// @include http://read.mangashare.com/*
// @include http://haven-reader.net/*
// @include http://www.manga2u.me/*
// @include http://manga2u.me/*
// @include http://buttersafe.com/*
// @include http://www.romanticallyapocalyptic.com/*
// @include http://romanticallyapocalyptic.com/*
// @include http://www.somethingpositive.net/*
// @include http://somethingpositive.net/*
// @include http://www.rhymes-with-witch.com/*
// @include http://rhymes-with-witch.com/*
// @include http://www.superstupor.com/*
// @include http://superstupor.com/*
// @include http://www.misfile.com/*
// @include http://www.asofterworld.com/*
// @include http://asofterworld.com/*
// @include http://www.achewood.com/*
// @include http://achewood.com/*
// @include http://www.act-i-vate.com/*
// @include http://act-i-vate.com/*
// @include http://www.biggercheese.com/*
// @include http://biggercheese.com/*
// @include http://www.gwscomic.com/*
// @include http://gwscomic.com/*
// @include http://www.fonflatter.de/*
// @include http://www.ruthe.de/*
// @include http://ruthe.de/*
// @include http://www.daybydaycartoon.com/*
// @include http://daybydaycartoon.com/*
// @include http://www.dieselsweeties.com/*
// @include http://dieselsweeties.com/*
// @include http://www.foxtrot.com/*
// @include http://www.csectioncomics.com/*
// @include http://garfieldminusgarfield.net/*
// @include http://www.girlgeniusonline.com/*
// @include http://www.gocomics.com/*
// @exclude http://www.gocomics.com/
// @exclude http://www.gocomics.com/?*
// @include http://www.gunnerkrigg.com/*
// @include http://gunnerkrigg.com/*
// @include http://www.ho-lo.co.il/*
// @include http://www.jeffzugale.com/*
// @include http://www.threepanelsoul.com/*
// @include http://threepanelsoul.com/*
// @include http://www.oglaf.com/*
// @include http://oglaf.com/*
// @include http://www.kevinandkell.com/*
// @include http://kevinandkell.com/*
// @include http://kittyhawkcomic.com/*
// @include http://www.lackadaisycats.com/comic.php*
// @include http://lackadaisycats.com/comic.php*
// @include http://www.lukesurl.com/*
// @include http://mycardboardlife.com/*
// @include http://megatokyo.com/*
// @include http://www.megatokyo.it/*
// @include http://www.megatokyo.de/*
// @include http://ex2.unixmanga.net/*
// @include http://allmymanga.com/*
// @include http://noreasoncomics.com/*
// @include http://www.pixelcomic.net/*
// @include http://pixelcomic.net/*
// @include http://www.redmeat.com/*
// @include http://redmeat.com/*
// @include http://sexylosers.com/*
// @include http://www.doonesbury.com/*
// @include http://stalebacon.com/*
// @include http://www.mangaeden.com/*
// @include http://www.pbfcomics.com/*
// @include http://tjandamal.com/*
// @include http://sfeertheory.littlefoolery.com/*
// @include http://wanderingones.com/*
// @include http://www.big-big-truck.com/ayiw/*
// @include http://big-big-truck.com/ayiw/*
// @include http://wapsisquare.com/*
// @include http://www.wastedtalent.ca/*
// @include http://www.wulffmorgenthaler.com/*
// @include http://wulffmorgenthaler.com/*
// @include http://www.weregeek.com/*
// @include http://*.katbox.net/*
// @include http://*.keenspace.com/*
// @include http://*.comicgenesis.com/*
// @include http://www.beanleafpress.com/*
// @include http://gipcomic.com/*
// @include http://www.theoswaldchronicles.com/*
// @include http://www.awkwardzombie.com/*
// @include http://awkwardzombie.com/*
// @include http://www.stainedglasssamurai.com/*
// @include http://stainedglasssamurai.com/*
// @include http://*.seraph-inn.com/*
// @include https://www.fakku.net/manga/*
// @include https://www.fakku.net/doujinshi/*
// @include http://www.deadwinter.cc/*
// @include http://deadwinter.cc/*
// @include http://www.loveisintheblood.com/*
// @include http://rhapsodies.wpmorse.com/*
// @include http://www.piratesofmars.com/*
// @include http://www.soulless-comic.com/*
// @include http://www.earthsongsaga.com/vol*
// @include http://rainchildstudios.com/strawberry/*
// @include http://www.goblinscomic.org/*
// @include http://www.venusenvycomic.com/*
// @include http://venusenvycomic.com/*
// @include http://www.meekcomic.com/*
// @include http://www.dominic-deegan.com/*
// @include http://dominic-deegan.com/*
// @include http://yafgc.net/*
// @include http://www.sdamned.com/*
// @include http://www.twolumps.net/*
// @include http://twolumps.net/*
// @include http://www.precociouscomic.com/*
// @include http://precociouscomic.com/*
// @include http://betweenplaces.spiderforest.com/*
// @include http://specialschool.spiderforest.com/*
// @include http://requiem.spiderforest.com/*
// @include http://sevensmith.net/chirault/*
// @include http://www.junglestudio.com/roza/*
// @include http://www.dream-scar.net/*
// @include http://dream-scar.net/*
// @include http://www.tryinghuman.com/*
// @include http://tryinghuman.com/*
// @include http://www.thedreamercomic.com/*
// @include http://thedreamercomic.com/
// @include http://www.shazzbaa.com/*
// @include http://shazzbaa.com/*
// @include http://www.sandraandwoo.com/*
// @include http://www.freakangels.com/*
// @include http://comics.com/*
// @include http://www.sakanacomic.com/*
// @include http://www.jaygeefisher.com/*
// @include http://jaygeefisher.com/*
// @include http://www.doujin-moe.us/*
// @include http://keychain.patternspider.net/*
// @include http://www.collectedcurios.com/*
// @include http://www.doomies.com/*
// @include http://doomies.com/*
// @include http://www.qgmindpolice.com/*
// @include http://www.slowwave.com/*
// @include http://slowwave.com/*
// @include http://www.sylvanmigdal.com/*
// @include http://sylvanmigdal.com/*
// @include http://www.c.urvy.org/*
// @include http://c.urvy.org/*
// @include http://www.the-artiste.net/*
// @include http://www.doublefine.com/*
// @include http://wwww.survivingtheworld.net/*
// @include http://survivingtheworld.net/*
// @include http://view.thespectrum.net/*
// @include http://www.mangavolume.com/*
// @include http://nonadventures.com/*
// @include http://www.robandelliot.cycomics.com/*
// @include http://robandelliot.cycomics.com/*
// @include http://soulsymphonycomic.com/*
// @include http://www.blastwave-comic.com/*
// @include http://www.channelate.com/*
// @include http://www.picturesforsadchildren.com/*
// @include http://picturesforsadchildren.com/*
// @include http://www.optipess.com/*
// @include http://www.drawuntilitsfunny.com/*
// @include http://beardfluff.com/*
// @include http://lawlscomic.com/*
// @include http://www.maakies.com/*
// @include http://www.lefthandedtoons.com/*
// @include http://trollscience.com/*
// @include http://www.diggercomic.com/*
// @include http://luciphurrsimps.com/*
// @include http://nikkisprite.com/*
// @include http://planet-nowhere.com/*
// @include http://www.mysisterthefreak.com/*
// @include http://www.gronkcomic.com/*
// @include http://www.redsplanet.com/*
// @include http://www.cowshell.com/*
// @include http://everblue-comic.com/*
// @include http://tmkcomic.depleti.com/*
// @include http://www.remindblog.com/*
// @include http://inkdolls.com/*
// @include http://www.terra-comic.com/*
// @include http://lovecraftismissing.com/*
// @include http://www.redmoonrising.org/*
// @include http://www.khaoskomix.com/*
// @include http://ipaintgirls.com/*
// @include http://memoria.valice.net/*
// @include http://www.twilightlady.com/*
// @include http://submanga.com/*
// @include http://g.e-hentai.org/*
// @include http://animesquish.com/*
// @include http://crazytje.be/*
// @include http://www.tenmangas.com/*
// @include http://tenmangas.com/*
// @include http://www.tenmanga.com/*
// @include http://tenmanga.com/*
// @include http://www.perveden.com/*
// @include http://reader.imangascans.org/*
// @include http://www.ekkifu.com/*
// @include http://www.bittersweetcandybowl.com/*
// @include http://www.doujintoshokan.com/*
// @include http://www.imagebam.com/*
// @include http://www.exploitationnow.com/*
// @include http://www.otakuworks.com/*
// @include http://h-manga.info/*
// @include http://basicinstructions.net/*
// @include http://www.insaneyetisquirrel.com/*
// @include http://*.kukudm.com/comiclist/*/*/*
// @include http://*.kukudm.net/comiclist/*/*/*
// @include http://mh.socomic.com/comiclist/*/*/*
// @include http://www.socomic.net/comiclist/*/*/*
// @include http://www.webcomicsnation.com/*
// @include http://www.pawn.se/*
// @include http://www.rpgworldcomic.com/*
// @include http://rpgworldcomic.com/*
// @include http://maskedretriever.com/*
// @include http://www.missmab.com/*
// @include http://www.lookwhatibroughthome.com/*
// @include http://hijinksensue.com/*
// @include http://www.darthsanddroids.net/*
// @include http://darthsanddroids.net/*
// @include http://www.harkavagrant.com/*
// @include http://www.turbosloth.net/*
// @include http://turbosloth.net/*
// @include http://www.walkinginsquares.com/*
// @include http://walkinginsquares.com/*
// @include http://dresdencodak.com/*
// @include http://www.straysonline.com/comic/*
// @include http://straysonline.com/comic/*
// @include http://www.emi-art.com/*
// @include http://emi-art.com/*
// @include http://www.dragonball-multiverse.com/*
// @include http://insanesoft.org/fanfyria/*
// @include http://*.snafu-comics.com/*
// @include http://www.wayfarersmoon.com/*
// @include http://wayfarersmoon.com/*
// @include http://*.smackjeeves.com/*
// @include http://www.10kcommotion.com/*
// @include http://10kcommotion.com/*
// @include http://somemangas.com/*
// @include http://www.multiplexcomic.com/*
// @include http://multiplexcomic.com/*
// @include http://www.johnandjohn.nl/index.php?*wltypeid=1*
// @include http://www.sorcery101.net/*
// @include http://www.treadingground.com/*
// @include http://www.jerkcity.com/*
// @include http://jerkcity.com/*
// @include http://www.kiwiblitz.com/*
// @include http://thepunchlineismachismo.com/*
// @include http://kafkaskoffee.com/*
// @include http://www.out-at-home.com/*
// @include http://occasionalcomics.com/*
// @include http://www.zombieboycomics.com/*
// @include http://www.babyblues.com/*
// @include http://babyblues.com/*
// @include http://www.bearandtiger.com/*
// @include http://mangatopia.net/*
// @include http://exhentai.org/*
// @include http://www.wigucomics.com/*
// @include http://www.mankin-trad.net/*
// @include http://mankin-trad.net/*
// @include http://www.mangahere.co/*
// @include http://es.mangahere.co/*
// @include http://www.scarygoround.com/*
// @include http://scarygoround.com/*
// @include http://www.schlockmercenary.com/*
// @include http://www.warehousecomic.com/*
// @include http://warehousecomic.com/*
// @include http://www.tnemrot.com/*
// @include http://www.holiday-wars.com/*
// @include http://www.zapcomic.com/*
// @include http://www.twokinds.net/*
// @include http://twokinds.net/*
// @include http://www.dumbingofage.com/*
// @include http://www.shortpacked.com/*
// @include http://www.itswalky.com/*
// @include http://itswalky.com/*
// @include http://www.evildivacomics.com/*
// @include http://axecop.com/*
// @include http://www.somethingofthatilk.com/*
// @include http://somethingofthatilk.com/*
// @include http://www.reddit.com/
// @include http://www.reddit.com/?*
// @include http://www.reddit.com/r/*
// @exclude http://www.reddit.com/*/comments/*
// @include http://blankitcomics.com/*
// @include http://www.anime-source.com/*
// @include http://anime-source.com/*
// @include http://www.mangarush.com/*
// @include http://www.citymanga.com/*/*/*
// @include http://citymanga.com/*/*/*
// @include http://www.dctp.ws/*/V*.html
// @include http://dctp.ws/*/V*.html
// @include http://dctpws.thetrogdor.com/*
// @include http://doctorcatmd.com/*
// @include http://www.sheldoncomics.com/*
// @include http://sheldoncomics.com/*
// @include http://luscious.net/*/pictures/*
// @include http://old.lu.scio.us/hentai/albums/*
// @exclude http://old.lu.scio.us/hentai/albums/*/page/*
// @include http://www.geekculture.com/joyoftech/*
// @include http://www.basketcasecomix.com/*
// @include http://www.geeklifecomic.com/*
// @include http://www.realmofatland.com/*
// @include http://realmofatland.com/*
// @include http://thedoujin.com/index.php?page=post&s=view&id=*
// @include http://eatmanga.com/*
// @include http://www.oslevadosdabreca.com/*
// @include http://www.thedevilbear.com/*
// @include http://thedevilbear.com/*
// @include http://www.bladebunny.com/*
// @include http://www.exiern.com/*
// @include http://nsfw-comix.com/*
// @include http://jaynaylor.com/*
// @include http://www.anelnoath.com/*
// @include http://www.faans.com/*
// @include http://www.truefork.org/*
// @include http://truefork.org/*
// @include http://www.aorange.com/*
// @include http://www.strangecandy.net/*
// @include http://www.thewotch.com/*
// @include http://thewotch.com/*
// @include http://www.cheercomic.com/*
// @include http://cheercomic.com/*
// @include http://www.sgvy.com/*
// @include http://sgvy.com/*
// @include http://www.drunkduck.com/*
// @include http://drunkduck.com/*
// @include http://www.ephralon.de/seekers_detailed.php*
// @include http://ephralon.de/seekers_detailed.php*
// @include http://www.terinu.com/*
// @include http://terinu.com/*
// @include http://dcisgoingtohell.com/*
// @include http://las-historietas.blogspot.com/*
// @include http://www.palcomix.com/*
// @include http://palcomix.com/*
// @include http://www.palcomix.org/*
// @include http://palcomix.org/*
// @include http://www.whiteninjacomics.com/*
// @include http://whiteninjacomics.com/*
// @include http://www.apenotmonkey.com/*
// @include http://malandchad.com/*
// @include http://www.goodmanga.net/*
// @include http://www.digitalcomicmuseum.com/*
// @include http://digitalcomicmuseum.com/*
// @include http://goldenagecomics.co.uk/*
// @include http://fourcolorshadows.blogspot.com/*
// @include http://thehorrorsofitall.blogspot.com/*
// @include http://bato.to/*
// @include http://www.eegra.com/*
// @include http://www.octopuspie.com/*
// @include http://www.lovemenicecomic.com/*
// @include http://www.manga-access.com/*
// @include http://manga-access.com/*
// @include http://www.ju-ni.net/*
// @include http://ju-ni.net/*
// @include http://blog.saveapathea.com/*
// @include http://www.dead-philosophers.com/*
// @include http://www.nerd-theater.com/*
// @include http://nerd-theater.com/*
// @include http://lackadaisy.foxprints.com/comic.php*
// @include http://www.mangastream.to/*
// @include http://www.kingfeatures.com/*
// @include http://kingfeatures.com/*
// @include http://www.thezombiehunters.com/*
// @include http://thezombiehunters.com/*
// @include http://www.bugcomic.com/*
// @include http://www.interrobangstudios.com/*
// @include http://interrobangstudios.com/*
// @include http://www.hlcomic.com/*
// @include http://hlcomic.com/*
// @include http://syacartoonist.com/*
// @include http://satwcomic.com/*
// @include http://stupidfox.net/*
// @include http://www.casualvillain.com/*
// @include http://fanboys-online.com/*
// @include http://www.girlswithslingshots.com/*
// @include http://www.mntgaiden.com/*
// @include http://truyen.vnsharing.net/*
// @include http://lovehentaimanga.com/*
// @include http://ravensdojo.com/*
// @include http://freefall.purrsia.com/*
// @include http://www.mangachapter.net/*
// @include http://www.shd-wk.com/*
// @include http://shd-wk.com/*
// @include http://www.pepsaga.com/*
// @include http://slimythief.com/*
// @include http://www.pebbleversion.com/*
// @include http://pebbleversion.com/*
// @include http://mentalcatproductions.com/*
// @include http://schoolbites.net/*
// @include http://www.accurseddragon.com/*
// @include http://www.krakowstudios.com/*
// @include http://www.stringtheorycomic.com/*
// @include http://www.supercrash.net/*
// @include http://loveandcapes.com/*
// @include http://victorycomic.comicgenesis.com/*
// @include http://magellanverse.com/*
// @include http://www.evil-comic.com/*
// @include http://flakypastry.runningwithpencils.com/*
// @include http://www.pointguardian.com/*
// @include http://gogetaroomie.chloe-art.com/*
// @include http://legendofbill.com/*
// @include http://www.springiette.net/*
// @include http://springiette.net/*
// @include http://www.vampirecheerleaders.net/*
// @include http://www.paranormalmysterysquad.com/*
// @include http://www.draculaeverlasting.com/*
// @include http://www.amazingagentjennifer.com/*
// @include http://mindmistress.comicgenesis.com/*
// @include http://www.evernightcomic.com/*
// @include http://www.xindm.cn/*
// @include http://mh2.xindm.cn/*
// @include http://www.manga123.com/read/*
// @include http://manga.redhawkscans.com/*
// @include http://www.mudascantrad.com/*
// @include http://slide.extrascans.net/*
// @include http://*.thewebcomic.com/*
// @include http://www.mangapark.com/*
// @include http://mangapark.com/*
// @include http://www.manga-go.com/*
// @include http://www.comicstriplibrary.org/display/*
// @include http://comicstriplibrary.org/display/*
// @include http://www.wirepop.com/*
// @include http://wirepop.com/*
// @include http://www.fantasyrealmsonline.com/manga/*
// @include http://foolrulez.org/*
// @include http://reader.japanzai.com/*
// @include http://www.psychopandas.com/reader/*
// @include http://psychopandas.com/reader/*
// @include http://www.ourmanga.com/*
// @include http://readonline.egscans.org/*
// @include http://read.egscans.org/*
// @include http://reader.eternalmanga.net/*
// @include http://gallery.ryuutama.com/*
// @include http://*.tiraecol.net/*
// @include http://tiraecol.net/*
// @include http://www.conejofrustrado.com/*
// @include http://www.e2w-illustration.com/*
// @include http://2gamerz.com/*
// @include http://reader.fth-scans.com/*
// @include http://www.simple-scans.com/*
// @include http://simple-scans.com/*
// @include http://www.mymangaspot.com/*
// @include http://comic.naver.com/*
// @include http://www.peteristhewolf.com/*
// @include http://peteristhewolf.com/*
// @include http://www.wlpcomics.com/*
// @include http://wlpcomics.com/*
// @include http://www.mangatraders.com/*
// @include http://hentaifromhell.net/*
// @include http://trenchescomic.com/*
// @include http://www.sakicow.com/reader/*
// @include http://sakicow.com/reader/*
// @include http://www.goominet.com/unspeakable-vault/*
// @include http://www.doesnotplaywellwithothers.com/*
// @include http://krakowstudios.com/*
// @include http://www.aikoniacomic.com/*
// @include http://aikoniacomic.com/*
// @include http://www.grrlpowercomic.com/*
// @include http://www.poisonedminds.com/*
// @include http://poisonedminds.com/*
// @include http://nodwick.humor.gamespy.com/*
// @include http://www.the-whiteboard.com/*
// @include http://the-whiteboard.com/*
// @include http://www.mezzacotta.net/*
// @include http://www.hbrowse.com/*
// @include http://www.vexxarr.com/*
// @include http://vexxarr.com/*
// @include http://aptitude.surfacingpoint.com/*
// @include http://www.bardsworth.com/*
// @include http://fancyadventures.com/*
// @include http://www.chron.com/entertainment/comics-games/comic/*
// @include http://www.purplepussy.net/*
// @include http://purplepussy.net/*
// @include http://www.heroeslocales.com/bunsen/*
// @include http://www.readhentaionline.com/*
// @include http://readhentaionline.com/*
// @include http://www.darklegacycomics.com/*
// @include http://darklegacycomics.com/*
// @include http://candicomics.com/*
// @include http://www.buckocomic.com/*
// @include http://bearmageddon.com/*
// @include http://betweenfailures.net/*
// @include http://www.sisterclaire.com/*
// @include http://www.fayerwayer.com/*
// @include http://www.niubie.com/*
// @include http://www.awesomehospital.com/*
// @include http://ars.userfriendly.org/cartoons/*
// @include http://www.friendswithboys.com/*
// @include http://www.mangago.com/*
// @include http://www.jesusandmo.net/*
// @include http://www.calamitiesofnature.com/*
// @include http://www.rosalarian.com/*
// @include http://rosalarian.com/*
// @include http://dungeond.com/*
// @include http://www.irregularwebcomic.net/*
// @include http://adistantsoil.com/*
// @include http://comic.nodwick.com/*
// @include http://ffn.nodwick.com/*
// @include http://ps238.nodwick.com/*
// @include http://kronos.mcanime.net/*
// @include http://www.ghastlycomic.com/*
// @include http://thedevilspanties.com/*
// @include http://walkingdeadbr.com/*displayimage.php*
// @include http://www.mangapanda.com/*
// @include http://mangable.com/*
// @include http://dragonflyscans.org/*
// @include http://readincesthentai.com/*
// @include http://www.animephile.com/*
// @include http://hentaistreamer.com/*
// @include http://kissmanga.com/*
// @include http://www.readmangahentai.com/*
// @include http://readmangahentai.com/*
// @include http://www.masterbloodfer.org/*
// @include http://masterbloodfer.org/*
// @include http://www.mangatank.com/*
// @include http://www.snowflakescomic.com/*
// @include http://mangafox.mobi/*
// @include http://www.mangainn.me/*
// @include http://invisiblebread.com/*
// @include http://www.shiftylook.com/comics/*
// @include http://onlinereader.mangapirate.net/*
// @include http://www.8comic.com/love/*
// @include http://8comic.com/love/*
// @include http://www.mangahead.com/*
// @include http://mangahead.com/*
// @include http://www.vickifox.com/*
// @include http://www.spinnyverse.com/*
// @include http://zenpencils.com/*
// @include http://wootmanga.com/*
// @include http://hentai2read.com/*
// @include http://m.hentai2read.com/*
// @include http://komikmy.com/*/*/*
// @include http://www.hentaifr.net/doujinshisheng.php*
// @include http://www.sientoymiento.cl/*
// @include http://www.commissionedcomic.com/*
// @include http://www.mangasky.com/*
// @include http://mangapirate.net/*
// @include http://nomanga.com/*
// @include http://www.pipi.cl/*
// @include http://hentaimangaonline.com/*
// @include http://webcomics.yaoi911.com/*
// @include http://www.whompcomic.com/*
// @include http://actiontimebuddies.com/*
// @include http://www.superbrophybrothers.com/*
// @include http://www.surasplace.com/*
// @include http://surasplace.com/*
// @include http://mangacow.me/*
// @include http://fallensyndicate.com/reader/*
// @include http://www.nekothekitty.net/*
// @include http://curtailedcomic.com/*
// @include http://www.wiemanga.com/*
// @include http://img.wiemanga.com/*
// @include http://hentai4manga.com/*
// @include http://bradcolbow.com/*
// @include http://www.gaomanga.com/*
// @include http://www.theherobiz.com/*
// @include http://guildedage.net/comic/*
// @include http://betweenfailures.com/*
// @include http://www.claudeandmonet.com/*
// @include http://phobia.subcultura.es/tira/*
// @include http://www.manga-tu.be/*
// @include http://de.ninemanga.com/*
// @include http://proxer.me/*
// @include http://www.demanga.com/*
// @include http://www.meinmanga.com/*
// @include http://www.senmanga.com/*
// @include http://raw.senmanga.com/*
// @include http://www.mangaesta.net/*
// @include http://www.mabuns.web.id/*
// @include http://www.manga4indo.com/*
// @include http://www.bloomingfaeries.com/*
// @include http://www.friendshipscans.com/*
// @include http://neechan.net/*
// @include http://www.komikid.com/*
// @include http://komikid.com/*
// @include http://blog.komikid.com/*
// @include http://www.findchaos.com/*
// @include http://chaoslife.findchaos.com/*
// @include http://moonoverjune.com/*
// @include http://www.shadbase.com/*
// @include http://www.shagbase.com/*
// @include http://www.mrlovenstein.com/*
// @include http://www.anticscomic.com/*
// @include http://octopuns.blogspot.com/*
// @include http://www.onemanga.me/*
// @include http://mangacow.co/*
// @include http://www.mangabee.com/*
// @include http://www.ver-manga.net/*
// @include http://mangadoom.co/*
// @include http://www.powernapcomic.com/*
// @include http://www.ismanga.com/*
// @include http://www.mangabird.com/*
// @include http://mangachrome.com/*
// @include http://www.7manga.com/*
// @include http://7manga.com/*
// @include http://www.mangadevil.com/*
// @include http://mangadevil.com/*
// @include http://www.mangamofo.com/*
// @include http://*.hentai.ms/*
// @include http://view.mangamonger.com/*
// @include http://blackbird.ashen-ray.com/*
// @include http://carciphona.com/*
// @include http://ahs-comic.com/*
// @include http://www.gogetaroomie.com/*
// @include http://gogetaroomie.com/*
// @include http://*.thecomicseries.com/*
// @include http://www.sleepymaid.com/gallery/displayimage.php*
// @include http://sleepymaid.com/gallery/displayimage.php*
// @include http://www.squid-ops.com/*
// @include http://squid-ops.com/*
// @include http://www.endcomic.com/*
// @include http://www.thenoobcomic.com/*
// @include http://thenoobcomic.com/*
// @include http://zizki.com/*
// @include http://*.zizki.com/*
// @include http://pururin.com/*
// @include http://www.thedailyblink.com/*
// @include http://mangabandits.net/*
// @include http://www.neumanga.com/*
// @include http://www.pecintakomik.com/*
// @include http://www.schizmatic.com/*
// @include http://schizmatic.com/*
// @include http://www.yuri-ism.net/*
// @include http://www.bringbackroomies.com/*
// @include http://blindsprings.com/*
// @include http://www.wtfcomics.com/*archive.html?*
// @include http://wtfcomics.com/*archive.html?*
// @include http://www.olympusoverdrive.com/index.php?*
// @include http://olympusoverdrive.com/index.php?*
// @include http://*gucomics.com/*
// @include http://www.punksandnerds.com/*
// @include http://*.troutcave.net/*
// @include http://www.berserkersdaughter.com/*
// @include http://gingerhaze.com/nimona/comic/*
// @include http://aiacrowd.com/*
// @include http://aspect.waywardstudios.net/*
// @include http://chirault.sevensmith.net/*
// @include http://cucumber.gigidigi.com/*
// @include http://filteredfuzz.com/*
// @include http://www.dorktower.com/*
// @include http://mangajoy.com/*
// @include http://nhentai.net/*
// @include http://www.hejibits.com/*
// @include http://mangaindo.co/*
// @include http://5.79.87.81/*
// @include http://www.dm72.com/*
// @include http://dm72.com/*
// @include http://www.gao-subs.com/*
// @include http://www.mangawindow.com/*
// @include http://mangawindow.com/*
// @include http://omgmanga.com/*
// @include http://paintraincomic.com/*
// @include http://extrafabulouscomics.com/*
// ==/UserScript==
var dataCache = null; //cache para no leer del disco y parsear la configuracion en cada getData
var firstRun = false;
//por si funcionan las GM_* pero falla preguntar sin el "this.", o si tiran una excepcion al preguntar
try{ GM_getValue = GM_getValue || this.GM_getValue; }catch(e){ GM_getValue = false; }
try{ GM_setValue = GM_setValue || this.GM_setValue; }catch(e){ GM_setValue = false; }
try{ GM_deleteValue = GM_deleteValue || this.GM_deleteValue; }catch(e){ GM_deleteValue = false; }
try{ GM_xmlhttpRequest = GM_xmlhttpRequest || this.GM_xmlhttpRequest; }catch(e){ GM_xmlhttpRequest = false; }
try{ GM_registerMenuCommand = GM_registerMenuCommand || this.GM_registerMenuCommand; }catch(e){ GM_registerMenuCommand = false; }
try{ GM_openInTab = GM_openInTab || this.GM_openInTab; }catch(e){ GM_openInTab = false; }
try{
//fix para usar data persistente sin pseudogreasemonkey
if (!GM_getValue || GM_getValue.toString().indexOf("not supported")>-1) {
GM_getValue=function (key,def) {
if(!localStorage || !localStorage.hasOwnProperty(key)) return def;
var val = localStorage[key];
return val !== undefined ? val : def;
};
GM_setValue=function (key,value) {
if(!localStorage) return null;
return localStorage[key]=value;
};
GM_deleteValue=function (key) {
if(localStorage) localStorage.removeItem(key);
};
}
else{
var gmsets = GM_getValue('wcr.settings', null);
if(gmsets) dataCache = JSON.parse(gmsets);
else{
firstRun = true;
GM_setValue('wcr.settings', '{}');
dataCache = {};
}
}
if(!GM_openInTab) GM_openInTab = window.open;
if(!GM_registerMenuCommand || GM_registerMenuCommand.toString().indexOf("not supported")>-1){
GM_registerMenuCommand = function(txt, fun){
var boton = document.createElement('button');
boton.innerHTML = txt;
setEvt(boton, 'click', fun);
document.body.appendChild(boton);
}
}
}catch(e){}
var prefetchSize = confPrefetchSize([defaultSettings.prefetchBack, defaultSettings.prefetchNext]); //number of prefetched pages ahead in each direction
var prefetchSizeStart = confPrefetchSizeStart([defaultSettings.prefetchBackStart, defaultSettings.prefetchNextStart]); //number of prefetched pages in each direction the first time
var prefetchNoNext = confBool('prefetchNoNext', true);
var keepLayout = confKeepLayout(defaultSettings.fullLayout); //decide to keep the original layout of the page (true) or use a clean minimalistic layout (false)
var debug = confDebug(defaultSettings.debugMode); //alerts on errors, and shows some of the currently cache'd pages/images with the "," key
var showButtons = confShowButtons(defaultSettings.showButtons); //show or hide the buttons (back/next, bookmarks, settings, etc...)
var leftImageClick = confLeftImageClick(defaultSettings.clikLeftHalfGoesBack); //specifies if clicking the left half of the image will take you to the previous page
var goToBookmark = confBool('goToBookmark', defaultSettings.goToBookmark);
var useHistoryAPI = confBool('useHistoryAPI', true);
var moveWhileLoading = confBool('moveWhileLoading', defaultSettings.moveWhileLoading);
var maximgs = []; //mantener solo este num de imagenes cargadas atras y adelante de la actual para no comer memoria
maximgs[1] = Math.max(23, prefetchSize[1]);
maximgs[-1] = Math.max(23, prefetchSize[0]);
var usarb64 = confBool('b64_images', false);
/* paginas[i] = {
url:
//'substring' or /regexp/ that matches the url
img:
//gets the element containing the desired image (not just the src, but the whole
)
//if not present, searches an img with a src containing some common strings like "/comics/" or "/strips/"
//'string' means "the
element whose src starts with 'string'"
back:
next:
//get the href of the back and next links
//if not present, defaults to links containing "back"|"prev" / "next" in the element's innerHTML
//'string' means "the href of the element that satisfies 'string' (as an xpath expression)
extra:
//optional array of additional content, as a 'literal string' or taken from the html by either ['xpath'] or [/regexp/, group number]
bgcol:
txtcol:
//override the default colors of the page for readability or aesthetics
//'#RRGGBB', '#RGB', 'rgb(r, g, b)'
js:
//executes a custom function after a page change, receiving the direction (1=forward, -1=back, 0 the first time) as a parameter
scrollx:
scrolly:
//tells the top-left coordinates for scrolling after changing page (default = U/L)
//'U', 'D', 'L', 'R' and 'M' are to show the top, bottom, left, right and middle of the image
//or it can be a number (in pixels) or a function that returns a number
layout:
//forces the default behaviour for the layout (true=keep the original, false=clean it)
xelem:
//string with an xpath expression to get the element to be used as placeholder for the extra content
//used only when keeping the original layout
}
img/back/next/extra[i] can be either:
'string',
['xpath expression that returns the first element found'],
['xpath expression that returns an array of elements', 'string to put between each element', ?first_index, ?last_index],
[/regular expression/, group number to get the desired content]
function(html_of_requested_page, position_relative_to_the_starting_page){ return content; }
a 'string' is interpreted as part of a default xpath expression for img/back/next, or a literal string for extra[i]
*/
var paginas = [
{ url: 'penny-arcade.com',
img: [['#comicFrame img']],
extra: [[['.title h2']]],
style: '#bb,#header{position:relative;}'
},
{ url: 'xkcd.',
img: ['//div[@id="comic"]//img'],
first: '.="|<"',
last: '.=">|"',
extra: ['
', ['//div[@id="ctitle"]'], function(html, pos) {
var href = xpath('//div[@id="comic"]//a/@href', html);
return '
' +
(href.indexOf('xkcd') >= 0 ? 'Large version' : 'Bonus Link!') +
'';
}, function(html, pos) {
var comic = xpath('//div[@id="comic"]', html);
var img = comic.getElementsByTagName('img')[0];
img.parentNode.removeChild(img);
return comic;
}],
bgcol: '#fff'
},
{ url: '*.dilbert.com',
img: [['.img-comic']],
back: '@alt="Older Strip"',
next: '@alt="Newer Strip"'
},
{ url: 'explosm.net/comics',
img: [['#main-comic']],
extra: [['//small[@class="author-credit-name"]/../../..'], [/[', ['//h3/*/text()'], ']
', [/"storycontent"[\s\S]+?([\s\S]+?)<\/div>/i, 1]]
},
{ url: 'thedoghousediaries.com',
img: [['#imgdiv img']],
back: [['#previouslink']],
next: [['#nextlink']],
extra: [[['#title-signoff-share']]]
},
{ url: /erfworld\.com\/(page\/|$)/,
img: ['//div[@class="entry"]//img'],
back: 'contains(.,"Older")',
next: 'contains(.,"Newer")',
extra: [['//div[@class="post"]/*', '', 0, 2], ['//div[@class="post"][1]//div[@class="entry"]/p[not(.//img)]', ''], '']
},
{ url: 'erfworld.com',
extra: [[['.post>h2']], ['//table[@class="PxgGalleryTable"]//p[not(img)]', '']]
},
{ url: 'es.juanelo.net/archivo',
img: 'http://es.juanelo.net/tiras/',
back: '.="« Anterior"',
next: '.="Siguiente »"',
style: '#page{width:1210px;} .narrowcolumn{width:810px;}'
},
{ url: 'es.juanelo.net/show',
img: ['//div[@id="tirashow"]//img[starts-with(@src, "http://es.juanelo.net/tiras/")]'],
back: ['//div[@id="tirashow"]//a[.="« Anterior"]/@href'],
next: ['//div[@id="tirashow"]//a[.="Siguiente »"]/@href'],
style: '#page{width:1210px;} .narrowcolumn{width:810px;}'
},
{ url: 'es.juanelo.net/20',
img: 'http://es.juanelo.net/tiras/',
back: 'contains(.,"«")',
next: 'contains(.,"»")',
extra: [[['img[src*="/tiras/"]', '
', 1]], [['.post>h2']], [['.entry>p']]],
style: '#page{width:1210px;} .narrowcolumn{width:810px;}',
bgcol: '#334255'
},
{ url: 'mangastream.com|readms.com',
img: [['#manga-page']],
back: [['.previous a']],
next: [['.next a']],
style: '.subnav[style*="fixed"]{display: none;}#wcr_imagen{max-width:none;}#reader-sky{z-index:-1;}',
scrollx:'R',
layout: true
},
{ url: 'terrorisland.net',
extra: [['//div[@class="commentary"]', '']]
},
{ url: 'drmcninja.com',
img: 'http://drmcninja.com/comics/',
extra: ['
', ['//select[@id="series_select"]'], ['//select[@id="page_select"]'], [['.post-comic .entry']]],
js: function(dir){
var selSer = xpath('//div[@id="wcr_div"]//*[@id="series_select"]');
setEvt(selSer, 'change', function(){
exec("document.location.href = '/archives/comic/'+series_arr["+selSer.selectedIndex+"].posts[0];");
});
selSer.style.visibility = 'visible';
selSer.disabled = false;
var selPag = xpath('//div[@id="wcr_div"]//*[@id="page_select"]');
setEvt(selPag, 'change', function(){
document.location.href = '/archives/comic/'+selPag.value;
});
}
},
{ url: 'manga.animea.net',
img: ['//img[@class="mangaimg"]'],
back: function(html, pos){
var page = parseInt(html.match(/var page = (\d+);/)[1]);
var pages = parseInt(html.match(/var pages=(\d+);/)[1]);
var chapter = html.match(/var chapter="(.+?)";/)[1];
var manga = decodeURI(link[pos]).match(new RegExp('/([^/]+)'+chapter.replace(/[-[\]{}()+?.,\\^$#\s]/g, "\\$&")))[1];
if(page > 1) return '/'+manga+chapter+'-page-'+(page-1)+'.html';
var chap = xpath('//select[@id="chapterlistheader"]/option[@value="'+chapter+'"]/preceding-sibling::option[1]/@value');
return '/'+manga+chap+'-page-end.html';
},
next: function(html, pos){
var page = parseInt(html.match(/var page = (\d+);/)[1]);
var pages = parseInt(html.match(/var pages=(\d+);/)[1]);
var chapter = html.match(/var chapter="(.+?)";/)[1];
var manga = decodeURI(link[pos]).match(new RegExp('/([^/]+)'+chapter.replace(/[-[\]{}()+?.,\\^$#\s]/g, "\\$&")))[1];
if(page < pages) return '/'+manga+chapter+'-page-'+(page+1)+'.html';
var chap = xpath('//select[@id="chapterlistheader"]/option[@value="'+chapter+'"]/following-sibling::option[1]/@value');
return '/'+manga+chap+'-page-1.html';
},
extra: [[['#chapterlistheader']], [['[name="page"]']]],
scrollx:'R',
js: function(dir){
var selchap = selCss('#wcr_extra #chapterlistheader');
if(dir){
selchap.innerHTML = selCss('#chapterlistheader', '
| '+props[p].desc+' | '; if(p=='extra') html += ''+tds[0]+' | '+tds[1]+' | '; } } html += '
| '+ ' | Key | '+ 'Alternate Key | '+ '
| '+teclas[t][0]+' | '+ ''+ ' | '+ ' |