diff --git a/README.md b/README.md index 6454091..865985e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ```
```, *Adding the attribute* **cglink** *turns any element into a controller. Note: cglink binds the controller to a* **[stage]** -* :new: To update any element dynamically, add the **cg-hot** class. This updates the element and its children every time the page changes. +* To update any element dynamically, add the **cg-hot** class. This updates the element and its children every time the page changes. * To add additional features, use a plug-in: @@ -30,13 +30,38 @@ ### Script If the Stage is the Body, and the Core is the Mind, then Scripts are the Soul. The Script is a JSON file that sets up the configuration options and adds images for each page. [This is how to do it.](https://github.com/ogewan/comix-ngn/wiki/How-to-Script) +#### Additive +:new: an additive is a simplified JSON file that expedites the addition of comic pages. +The following is the structure: +``` js + {"p":[ + imageurl 1, imageurl 2, imageurl 3, etc... + ]} + ``` +To enable the additive feature: +Add the **additive** attribute to selected venue + +or +Add an address to the additive option in the config section of the Script.JSON ### Attributes For more fine-grain control, use the following additional attributes or class properties: * __SPECIAL__ - These classes change the properties of whatever they are set on. * __cgdate__ - This sets the elements [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML) or inner text to the release date of Stage page. * __cgtitle__ - This sets the elements [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML) or inner text to the title of Stage page. * __CORE__ - These attributes customizes settings and performance of comix-ngn. + * __fBox__ - fBox functions as a sort of fusebox that globally toggles many options: +(*Note: fBox requires the following format "{'option': true/false}"*) + + `````` + + * __fstrun__ (bool): toggles stageInjection on page load + * __pgepsh__ (bool): toggles url change on slide change + * __pgesve__ (bool): toggles slide number saving in localStorage + * __protect__ (bool): by default, the comix(main comic) is set once, if protect is set to default, the comix is overwritten per stageInjection + * __noverwrite__ (bool): by default, stageInjection cannot overwrite already inserted comics, set to false to allow overwriting + * __arrow__ (bool): toggles arrow key navigation + * __comicID__ - This sets the ID of the comic which is allows the framework to save site specific settings to user's browsers, such as most recently viewed page. It will default to the website's host name if not given. `````` diff --git a/additive.json b/additive.json new file mode 100644 index 0000000..e628416 --- /dev/null +++ b/additive.json @@ -0,0 +1 @@ +{"p":["http://pre03.deviantart.net/fe47/th/pre/f/2014/301/8/3/how_to_po__page_06_by_ladisilverfox-d84ix3x.jpg","http://pre06.deviantart.net/0c7f/th/pre/f/2014/301/6/9/how_to_po__page_07_by_ladisilverfox-d84ix44.jpg","http://pre03.deviantart.net/9240/th/pre/f/2014/301/0/4/how_to_po__page_08_by_ladisilverfox-d84ix4e.jpg","http://pre04.deviantart.net/d793/th/pre/f/2014/301/c/1/how_to_po__page_09_by_ladisilverfox-d84ix4p.jpg","http://pre07.deviantart.net/f25b/th/pre/f/2014/301/3/7/how_to_po__page_10_by_ladisilverfox-d84ix4x.jpg","http://pre06.deviantart.net/b853/th/pre/f/2014/301/3/4/how_to_po__page_11_by_ladisilverfox-d84ix56.jpg","http://pre05.deviantart.net/48ee/th/pre/f/2014/301/e/2/how_to_po__page_12_by_ladisilverfox-d84ix5b.jpg","http://pre05.deviantart.net/7811/th/pre/f/2015/075/b/b/how_to_po__page_13_by_ladisilverfox-d8m13ky.jpg","http://pre01.deviantart.net/42c8/th/pre/f/2015/075/b/2/how_to_po__page_14_by_ladisilverfox-d8m12mn.jpg","http://pre11.deviantart.net/ad85/th/pre/f/2015/075/b/9/how_to_po__page_15_by_ladisilverfox-d8m12my.jpg","http://pre03.deviantart.net/a4d3/th/pre/f/2015/075/7/7/how_to_po__page_16_by_ladisilverfox-d8m12n8.jpg","http://pre04.deviantart.net/f7bc/th/pre/f/2015/075/4/f/how_to_po__page_17_by_ladisilverfox-d8m12nc.jpg","http://pre04.deviantart.net/d8d6/th/pre/f/2015/075/1/b/how_to_po__page_18_by_ladisilverfox-d8m12nn.jpg","http://pre03.deviantart.net/1492/th/pre/f/2015/075/9/0/how_to_po__page_19_by_ladisilverfox-d8m12nw.jpg","http://pre04.deviantart.net/ff2a/th/pre/f/2015/075/b/f/how_to_po__page_20_by_ladisilverfox-d8m12o8.jpg","http://pre00.deviantart.net/d0fd/th/pre/f/2015/075/d/0/how_to_po__page_21_by_ladisilverfox-d8m12od.jpg","http://pre05.deviantart.net/990a/th/pre/f/2015/075/1/b/how_to_po__page_22_by_ladisilverfox-d8m12oj.jpg","http://pre12.deviantart.net/6acc/th/pre/f/2015/075/b/b/how_to_po__page_23_by_ladisilverfox-d8m12oo.jpg","http://pre04.deviantart.net/f10b/th/pre/f/2015/075/6/8/how_to_po__page_24_by_ladisilverfox-d8m12ox.jpg","http://pre14.deviantart.net/5c7d/th/pre/f/2015/075/f/a/how_to_po__page_25_by_ladisilverfox-d8m12p0.jpg","http://pre13.deviantart.net/5d92/th/pre/f/2015/075/6/4/how_to_po__page_26_by_ladisilverfox-d8m12p8.jpg","http://pre14.deviantart.net/710a/th/pre/f/2015/099/a/7/how_to_po__page_27_by_ladisilverfox-d8p3ggk.jpg","http://pre04.deviantart.net/d0aa/th/pre/f/2015/099/b/3/how_to_po__page_28_by_ladisilverfox-d8p3gh2.jpg","http://pre14.deviantart.net/aadf/th/pre/f/2015/099/4/e/how_to_po__page_29_by_ladisilverfox-d8p3ghx.jpg","http://pre05.deviantart.net/f0e5/th/pre/f/2015/099/8/8/how_to_po__page_30_by_ladisilverfox-d8p3gi4.jpg","http://pre00.deviantart.net/8eb3/th/pre/f/2015/099/a/1/how_to_po__page_31_by_ladisilverfox-d8p3gic.jpg","http://pre11.deviantart.net/f04a/th/pre/f/2015/099/9/7/how_to_po__page_32_by_ladisilverfox-d8p3gis.jpg","http://pre04.deviantart.net/0e56/th/pre/f/2015/099/3/8/how_to_po__page_33_by_ladisilverfox-d8p3gj6.jpg","http://pre12.deviantart.net/411c/th/pre/f/2015/200/0/1/how_to_po__page_34_by_ladisilverfox-d91zcnc.jpg","http://pre03.deviantart.net/8e5c/th/pre/f/2015/200/1/0/how_to_po__page_35_by_ladisilverfox-d91zcnv.jpg","http://pre02.deviantart.net/086b/th/pre/f/2015/200/0/6/how_to_po__page_36_by_ladisilverfox-d91zco7.jpg","http://pre09.deviantart.net/cf1e/th/pre/f/2015/200/7/7/how_to_po__page_37_by_ladisilverfox-d91zcp6.jpg"]} \ No newline at end of file diff --git a/comixngn.js b/comixngn.js index 4388be7..5a3b8a1 100644 --- a/comixngn.js +++ b/comixngn.js @@ -1,4 +1,4 @@ -/** @preserve comix-ngn v1.1.1 | (c) 2015 Oluwaseun Ogedengbe| ogewan.github.io/comix-ngn/ |License: MIT| +/** @preserve comix-ngn v1.2.0 | (c) 2015 Oluwaseun Ogedengbe| ogewan.github.io/comix-ngn/ |License: MIT| embeds domReady: github.com/ded/domready (MIT) (c) 2013 Dustin Diaz, pegasus: typicode.github.io/pegasus (MIT) (c) 2014 typicode, pathjs (MIT) (c) 2011 Mike Trpcic, direction.js*/ /*The namespace of comix-ngn all variables should be properties of this to prevent global namespace pollution*/ @@ -9,7 +9,15 @@ cG.N =function(){return 0};/*null function*/ if(void 0===cG.$GPC){cG.$GPC=0;}/*Global Plugin Counter (no longer global)*/ cG.root = '';/*current default settings of cng, overwritten by plugins*/ cG.cPanel = cG.cPanel||{};/*cG control panel, all stages are stored here*/ -cG.info = {vix: "1.1.1",vwr: "0.5.0",vpr: "0.1.0"};/*version settings*/ +cG.fBox = cG.fBox||{fstrun: true, pgepsh: true, pgesve: true, rtepge: true, protect: true, noverwrite: true, arrow: true};/*cG fuse box, toggles various options +* fstrun - toggles automatic stage injection on document ready +* pgepsh - toggles page url push to urlbar and history +* pgesve - toggles page saving in localstorage +* rtepge - toggles routing +* protect - toggles comix settings +* noverwrite - by default, stageInjection cannot overwrite already inserted comics, set to false to allow overwriting +* arrow - toggles arrow key navigation */ +cG.info = {vix: "1.2.0.",vwr: "1.0.0",vpr: "0.1.0"};/*version settings*/ cG.dis = cG.dis||{};//disables statistic and error reporting cG.recyclebin = cG.recyclebin||{};//variables that are used in initialization, disposed at stage injection cG.queue = cG.queue||{};//stores functions that are called incertain events @@ -57,6 +65,9 @@ cG.controllers = cG.controllers||{};//stores all nav bars that control stages he if(selfScript.getAttribute("air") !== void 0&&selfScript.getAttribute("air")!==null){ cG.recyclebin.air=selfScript.getAttribute("air");//asset path override } + if(selfScript.getAttribute("fBox") !== void 0&&selfScript.getAttribute("fBox")!==null){ + cG.fBox = JSON.parse(selfScript.getAttribute("fBox"));//asset path override + } } }() @@ -142,21 +153,300 @@ cG.REPO.producer = {"def":cG.N}; /////// cG.REPO.stage = {"def":{id:"def",construct:function(name,scriptt,anchor,options){ - var direction=function(d,m,v,b){b=b||{};var l={parent:null,offset:0,loading:{lines:b.lines||16,rate:b.rate||1E3/30,diameter:b.diameter||250,back:b.loaderback||"#FFF",color:b.color||"#373737"},config:{dir:b.dir||"assets/",pagestartnum:!1,chapterstartnum:!1,imgprebuffer:b.imgprebuffer||5,imgpostbuffer:b.imgpostbuffer||5,startpage:0,back:b.back||"#FFF"},pages:[]};if(void 0===d)return-1;if("string"===typeof d)l.pages.push({alt:"",hover:"",title:"",url:[d],release:0,note:"",perm:!1,anim8:!1}),d=l;else if(Array.isArray(d)){for(b= -0;b=b)b=400;0>a.y&&(a.y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);0>a.x&&(a.x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);var c={x:void 0!==window.pageXOffset?a.x-window.pageXOffset:a.x-document.documentElement.scrollLeft,y:void 0!==window.pageYOffset?a.y-window.pageYOffset:a.y-document.documentElement.scrollTop};if(c=={x:0,y:0})return c;var d=function(a, -b,c){window.scrollBy(Math.floor(a.x)/b,Math.floor(a.y)/b);c+1<5*b&&window.setTimeout(d,5,a,b,c+1)};window.setTimeout(d,5,c,Math.floor(b/5),0);return c},l=function(){e[this.imaginaryID].loaded=!0},r=function(a,b){y=!0;window.setTimeout(F,p.rate,E);B();0>b&&(b=0);b>=h&&(b=h-1);e[b].loaded||A.clearRect(0,0,c[1].width,c[1].height);a.imaginaryID=b;a.src=q.dir+e[b].url[0];n=b;for(var d=0,f=b-1;f>b-q.imgprebuffer-1&&0<=f;f--)e[f].loaded||(u[d].imaginaryID=f,u[d].src=q.dir+e[f].url,d++);d=0;for(f=b+1;f=count) idd=count-1; //can not be equal to our higher than the amount of pages + if(!iimg[idd].loaded) context.clearRect(0, 0, layers[1].width, layers[1].height); + imagething.imaginaryID = idd; + console.log(config.dir+iimg[idd].url[0]); + imagething.src = config.dir+iimg[idd].url[0]; + current = idd;//we change page as soon as it is assigned, so that page still changes even if it never loads + /*console.log("----"); + for(var q = idd-1;q>idd-self.config.imgprebuffer-1&&q>=0;q--){ + console.log(q); + } + console.log("//"); + for(var q = idd+1;qidd-config.imgprebuffer-1&&q>=0;q--){ + if(iimg[q].loaded) continue; + preload[r].imaginaryID = q; + preload[r].src = config.dir+iimg[q].url; + r++; + } + r = 0; + for(var q = idd+1;q0)?slidend:slidestart:sliding; + if(type) + if(type>0) slidend = callback; + else slidestart = callback; + else sliding = callback; + return 1; + } + this.go = function(to){ + var sre = (to===null||void 0===to)?0:parseInt(to,10); + //console.log(sre); + sre = (isNaN(sre))?0:sre; + assign(master,(Math.floor(Math.max(0,Math.min(count-1,sre))))); + return sre; + } + this.prev = function(){ + var sre = current-1;//avoids possible race condition, assign loads in new image which can call preloadMaster which can change self.current before it gets to the return call. storing it premptively will preserve the value + if(sre>=0) assign(master,sre); + return sre; + } + this.next = function(){ + //console.log("Hello"); + var sre = current+1; + if(sre=0) assign(master,0); + return 0; + } + this.last = function(){ + assign(master,count-1); + return count-1; + } + this.rand = function(){ + var sre = Math.floor(Math.random() * (count-1)); + //console.log(sre); + assign(master,sre); + return sre; + } + this.data = function(to){//returns info about slide + var sre = (to===null||void 0===to)?current:parseInt(to,10); + return (isNaN(sre))?iimg[current]:iimg[(Math.floor(Math.max(0,Math.min(count-1,sre))))]; + } + this.scroll = function(bool){//toggles Auto Scrolling + if(bool===null||void 0===bool) return skroll; + return skroll=bool; + } + this.scrollTo = function(to,time){return scrollit(to,time);}//public wrapper for scrollit + //LOADER - setup + layers[0].height=480; + //layers[0].width=640; + layers[0].style.background=spinner.back; + layers[0].style.paddingLeft="170px"; + layers[0].style.zIndex=0; + layers[0].style.position="absolute"; + + //objref = object; + //console.log(layers[1]); + if(anchor) anchor.appendChild(layers[0]); + else document.body.appendChild(layers[0]); + //console.log(object); + //intervall=window.setInterval(spin, spinner.rate, object); + window.setTimeout(spin, spinner.rate, object); + //DISPLAY - setup + master = new Image(); + master.imaginaryID = -1;//unset to an imaginary image + master.addEventListener("load", preloadMaster, false); + //console.log(this.master); + for(var q = 0;q0&&cG.avx[1]>0) cG.verbose(1,cG.comicID+"|"+name+"|curPage",":",get); - else console.log(cG.comicID+"|"+name+"|curPage",":",get); + /*if(cG.avx[0]>0&&cG.avx[1]>0) */cG.verbose(1,cG.comicID+"|"+name+"|curPage",":",get); + /*else console.log(cG.comicID+"|"+name+"|curPage",":",get);*/ } if(cG.comix===void 0&&cG.prePage>=0) get = cG.prePage;//prepage, which is from router, overwrites localStorage if over -1, only works on comix var main = new direction(scriptt,anchor,get); @@ -224,7 +514,7 @@ return a};this.frst=function(){0<=n&&r(k,0);return 0};this.last=function(){r(k,h return main.go(main.internals.chapters[main.ch_count()-1][g]); } var lscurrent = function(){ - if(typeof(Storage) !== void 0) { + if(typeof(Storage) !== void 0&&cG.fBox.pgesve) { localStorage.setItem(cG.comicID+"|"+name+"|curPage",cG.cPanel[/*"def_"+*/name].current().toString()); } if(cG.comix===cG.cPanel[/*"def_"+*/name]){//if comic is the comix, then push its state @@ -253,7 +543,7 @@ return a};this.frst=function(){0<=n&&r(k,0);return 0};this.last=function(){r(k,h } //if(cG.avx[0]>0&&cG.avx[1]>0) cG.verbose(1,name,"Pushing state:",result); - history.pushState({}, null, "#/"+result); + if(cG.fBox.pgepsh) history.pushState({}, null, "#/"+result); } if(cG.queue.stageChange!==void 0) for(var ftn in cG.queue.stageChange){ @@ -281,7 +571,9 @@ return a};this.frst=function(){0<=n&&r(k,0);return 0};this.last=function(){r(k,h } } main.callback(1,lscurrent); - cG.comix = cG.comix||main;//this should only set the comix on the first call + cG.comix = (cG.fBox.protect)?cG.comix||main:main; + //if protect is true - set the comix on the first call + //else always overwrite comix return main; }}}; /////// @@ -414,9 +706,58 @@ cG.queue.stageChange.controller=function(target){ } } }; +cG.addRender = function(addme,dest,name){ + //dest = script obj + var pushonpages = function(tget){ + //convert data to page array + var work; + for(var i =0;i
  • ', + antictrl = '
    ', pod,podling, errr = "controlInjection can only operate on elements or arrays of elements", eventer=function(par,chd){ @@ -451,7 +792,7 @@ cG.controlInjection = function(SPECIFIC){ working=new Date(cG.cPanel[par.id].data().release*1000); classdate[eq].innerHTML = working.toDateString(); } - }); + }); q[y].setAttribute("cgae","1"); } for (var y = 0; y < w.length; y++){ @@ -466,7 +807,7 @@ cG.controlInjection = function(SPECIFIC){ working=new Date(cG.cPanel[par.id].data().release*1000); classdate[eq].innerHTML = working.toDateString(); } - }); + }); w[y].setAttribute("cgae","1"); } for (var y = 0; y < e.length; y++){ @@ -538,7 +879,7 @@ cG.controlInjection = function(SPECIFIC){ for(var u=0;u1&&cG.avx[1]>0){} //console.log(stages[iD]) - if(stages[iD].getAttribute("id")==cG.comix.name) stages[iD].setAttribute("comix",1); + if(!cG.fBox.protect) stages[iD].setAttribute("comix",-1);//comix protection disabled, all stages are comix + else if(stages[iD].getAttribute("id")==cG.comix.name) stages[iD].setAttribute("comix",1); var chl = stages[iD].children; for(var t = 1;t=e&&console.log([].concat(c).join(" "))}; -if(1!=cG.dis.rollbar){var _rollbarConfig=_rollbarConfig||{accessToken:"3e8e8ecb63a04b5798e1d02adf2608cb",ignoredMessages:["CNG Plug-in:","status:"],captureUncaught:!0,payload:{environment:"development",client:{javascript:{source_map_enabled:!0,code_version:cG.info.vix,guess_uncaught_frames:!0}}}};!function(a){function c(f){if(e[f])return e[f].exports;var g=e[f]={exports:{},id:f,loaded:!1};return a[f].call(g.exports,g,g.exports,c),g.loaded=!0,g.exports}var e={};return c.m=a,c.c=e,c.p="",c(0)}([function(a, -c,e){a=e(1).Rollbar;e=e(2);_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://d37gvrvc0wt4s1.cloudfront.net/js/v1.4/rollbar.min.js";a=a.init(window,_rollbarConfig);e=e(a,_rollbarConfig);a.loadFull(window,document,!1,_rollbarConfig,e)},function(a,c){function e(){var a=window.console;a&&"function"==typeof a.log&&a.log.apply(a,arguments)}function f(a){this.shimId=++x;this.notifier=null;this.parentShim=a;this.logger=e;this._rollbarOldOnError=null}function g(a,c,e){window._rollbarWrappedError&& -(e[4]||(e[4]=window._rollbarWrappedError),e[5]||(e[5]=window._rollbarWrappedError._rollbarContext),window._rollbarWrappedError=null);a.uncaughtError.apply(a,e);c&&c.apply(window,e)}function d(a){return v(function(){if(this.notifier)return this.notifier[a].apply(this.notifier,arguments);var c=this,e="scope"===a;e&&(c=new f(this));var d=Array.prototype.slice.call(arguments,0);return window._rollbarShimQueue.push({shim:c,method:a,args:d,ts:new Date}),e?c:void 0})}function q(a,c){if(c.hasOwnProperty&& -c.hasOwnProperty("addEventListener")){var e=c.addEventListener;c.addEventListener=function(c,d,f){e.call(this,c,a.wrap(d),f)};var d=c.removeEventListener;c.removeEventListener=function(a,c,e){d.call(this,a,c&&c._wrapped?c._wrapped:c,e)}}}function v(a,c){return c=c||e,function(){try{return a.apply(this,arguments)}catch(e){c("Rollbar internal error:",e)}}}var x=0;f.init=function(a,c){var e=c.globalAlias||"Rollbar";if("object"==typeof a[e])return a[e];a._rollbarShimQueue=[];a._rollbarWrappedError=null; -c=c||{};var d=new f;return v(function(){if(d.configure(c),c.captureUncaught){d._rollbarOldOnError=a.onerror;a.onerror=function(){var a=Array.prototype.slice.call(arguments,0);g(d,d._rollbarOldOnError,a)};var f,x,v="EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload".split(" "); -for(f=0;f=d&&console.log([].concat(c).join(" "))}; +if(1!=cG.dis.rollbar){var _rollbarConfig=_rollbarConfig||{accessToken:"3e8e8ecb63a04b5798e1d02adf2608cb",ignoredMessages:["CNG Plug-in:","status:"],captureUncaught:!0,payload:{environment:"development",client:{javascript:{source_map_enabled:!0,code_version:cG.info.vix,guess_uncaught_frames:!0}}}};!function(a){function c(f){if(d[f])return d[f].exports;var g=d[f]={exports:{},id:f,loaded:!1};return a[f].call(g.exports,g,g.exports,c),g.loaded=!0,g.exports}var d={};return c.m=a,c.c=d,c.p="",c(0)}([function(a, +c,d){a=d(1).Rollbar;d=d(2);_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://d37gvrvc0wt4s1.cloudfront.net/js/v1.4/rollbar.min.js";a=a.init(window,_rollbarConfig);d=d(a,_rollbarConfig);a.loadFull(window,document,!1,_rollbarConfig,d)},function(a,c){function d(){var a=window.console;a&&"function"==typeof a.log&&a.log.apply(a,arguments)}function f(a){this.shimId=++x;this.notifier=null;this.parentShim=a;this.logger=d;this._rollbarOldOnError=null}function g(a,c,d){window._rollbarWrappedError&& +(d[4]||(d[4]=window._rollbarWrappedError),d[5]||(d[5]=window._rollbarWrappedError._rollbarContext),window._rollbarWrappedError=null);a.uncaughtError.apply(a,d);c&&c.apply(window,d)}function e(a){return v(function(){if(this.notifier)return this.notifier[a].apply(this.notifier,arguments);var c=this,d="scope"===a;d&&(c=new f(this));var e=Array.prototype.slice.call(arguments,0);return window._rollbarShimQueue.push({shim:c,method:a,args:e,ts:new Date}),d?c:void 0})}function p(a,c){if(c.hasOwnProperty&& +c.hasOwnProperty("addEventListener")){var d=c.addEventListener;c.addEventListener=function(c,e,f){d.call(this,c,a.wrap(e),f)};var e=c.removeEventListener;c.removeEventListener=function(a,c,d){e.call(this,a,c&&c._wrapped?c._wrapped:c,d)}}}function v(a,c){return c=c||d,function(){try{return a.apply(this,arguments)}catch(d){c("Rollbar internal error:",d)}}}var x=0;f.init=function(a,c){var d=c.globalAlias||"Rollbar";if("object"==typeof a[d])return a[d];a._rollbarShimQueue=[];a._rollbarWrappedError=null; +c=c||{};var e=new f;return v(function(){if(e.configure(c),c.captureUncaught){e._rollbarOldOnError=a.onerror;a.onerror=function(){var a=Array.prototype.slice.call(arguments,0);g(e,e._rollbarOldOnError,a)};var f,x,v="EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload".split(" "); +for(f=0;f=e.status?e.responseText:null} -cG.REPO=cG.REPO||{};cG.REPO.agent={def:function(a,c){return c=new XMLHttpRequest,c.open("GET",a),a=[],c.onreadystatechange=c.then=function(e,f,g){if(e&&e.call&&(a=[,e,f]),4==c.readyState&&(g=a[0|c.status/200]))try{g(JSON.parse(c.responseText),c)}catch(d){g(c.responseText,c)}},c.send(),c}};cG.REPO.director={def:Path};cG.REPO.producer={def:cG.N}; -cG.REPO.stage={def:{id:"def",construct:function(a,c,e,f){var g;"undefined"!==typeof Storage&&(g=parseInt(localStorage.getItem(cG.comicID+"|"+a+"|curPage"),10),0=c)c=400;0>a.y&&(a.y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);0>a.x&&(a.x=window.innerWidth|| -document.documentElement.clientWidth||document.body.clientWidth);var d={x:void 0!==window.pageXOffset?a.x-window.pageXOffset:a.x-document.documentElement.scrollLeft,y:void 0!==window.pageYOffset?a.y-window.pageYOffset:a.y-document.documentElement.scrollTop};if(d=={x:0,y:0})return d;var e=function(a,c,d){window.scrollBy(Math.floor(a.x)/c,Math.floor(a.y)/c);d+1<5*c&&window.setTimeout(e,5,a,c,d+1)};window.setTimeout(e,5,d,Math.floor(c/5),0);return d},f=function(){r[this.imaginaryID].loaded=!0},E=function(a, -c){A=!0;window.setTimeout(J,h.rate,I);G();0>c&&(c=0);c>=p&&(c=p-1);r[c].loaded||B.clearRect(0,0,m[1].width,m[1].height);a.imaginaryID=c;a.src=l.dir+r[c].url[0];t=c;for(var d=0,e=c-1;e>c-l.imgprebuffer-1&&0<=e;e--)r[e].loaded||(w[d].imaginaryID=e,w[d].src=l.dir+r[e].url,d++);d=0;for(e=c+1;ef;f++)d[f].indexOf("Y")+1?d[f]=c.getYear()-100:d[f].indexOf("M")+1?d[f]=c.getMonth()+1:d[f].indexOf("D")+1&&(d[f]=c.getDate());f=d.join("/");break;default:f+=d}cG.verbose(1,a,"Pushing state:",f);history.pushState({},null,"#/"+f)}if(void 0!==cG.queue.stageChange)for(var n in cG.queue.stageChange)if(cG.queue.stageChange.hasOwnProperty(n))cG.queue.stageChange[n](cG.cPanel[a]);n=cG.cPanel[a].data(cG.cPanel[a].current()).special;f=document.getElementById(a+"_tempScript");c=cG.HELPERS.stick(cG.cPanel[a].canvi[0], -null,null,0);d=cG.HELPERS.stick(cG.cPanel[a].canvi[1],null,null,1);void 0!==f&&null!==f&&(e.removeChild(f),c._show(),d._show());null!==n&&void 0!==n&&""!=n&&(f=document.createElement("SPAN"),f.setAttribute("id",a+"_tempScript"),f.innerHTML=n,e.appendChild(f),c._hide(),d._hide())});cG.comix=cG.comix||d;return d}}};cG.REPO.scReq=cG.REPO.scReq||{};cG.REPO.ctrls=cG.REPO.ctrls||{def:""};cG.REPO.decor=cG.REPO.decor||{def:""};cG.REPO.script=cG.REPO.script||{def:""};cG.agent=cG.REPO.agent.def; -cG.director=cG.REPO.director.def;cG.producer=cG.REPO.producer.def;cG.ctrls=cG.REPO.ctrls.def;cG.decor=cG.REPO.decor.def;cG.script=cG.REPO.script.def;cG.stage=cG.REPO.stage.def;cG.HELPERS={}; -!function(){for(var a,c,e=document.getElementsByTagName("SCRIPT"),f=0;f=d.status?d.responseText:null} +cG.REPO=cG.REPO||{};cG.REPO.agent={def:function(a,c){return c=new XMLHttpRequest,c.open("GET",a),a=[],c.onreadystatechange=c.then=function(d,f,g){if(d&&d.call&&(a=[,d,f]),4==c.readyState&&(g=a[0|c.status/200]))try{g(JSON.parse(c.responseText),c)}catch(e){g(c.responseText,c)}},c.send(),c}};cG.REPO.director={def:Path};cG.REPO.producer={def:cG.N}; +cG.REPO.stage={def:{id:"def",construct:function(a,c,d,f){var g;"undefined"!==typeof Storage&&(g=parseInt(localStorage.getItem(cG.comicID+"|"+a+"|curPage"),10),cG.verbose(1,cG.comicID+"|"+a+"|curPage",":",g));void 0===cG.comix&&0<=cG.prePage&&(g=cG.prePage);var e=new function(a,c,d,e){e=e||{};var f={parent:null,offset:0,loading:{lines:e.lines||16,rate:e.rate||1E3/30,diameter:e.diameter||250,back:e.loaderback||"#FFF",color:e.color||"#373737"},config:{dir:e.dir||"assets/",pagestartnum:!1,chapterstartnum:!1, +imgprebuffer:e.imgprebuffer||5,imgpostbuffer:e.imgpostbuffer||5,startpage:0,back:e.back||"#FFF"},pages:[]};if(void 0===a)return-1;if("string"===typeof a)f.pages.push({alt:"",hover:"",title:"",url:[a],release:0,note:"",perm:!1,anim8:!1}),a=f;else if(Array.isArray(a)){for(e=0;e=c)c=400;0>a.y&&(a.y=window.innerHeight||document.documentElement.clientHeight|| +document.body.clientHeight);0>a.x&&(a.x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);var e={x:void 0!==window.pageXOffset?a.x-window.pageXOffset:a.x-document.documentElement.scrollLeft,y:void 0!==window.pageYOffset?a.y-window.pageYOffset:a.y-document.documentElement.scrollTop};if(e=={x:0,y:0})return e;var d=function(a,c,e){window.scrollBy(Math.floor(a.x)/c,Math.floor(a.y)/c);e+1<5*c&&window.setTimeout(d,5,a,c,e+1)};window.setTimeout(d,5,e,Math.floor(c/5),0); +return e},f=function(){r[this.imaginaryID].loaded=!0},E=function(a,c){A=!0;window.setTimeout(J,h.rate,I);G();0>c&&(c=0);c>=n&&(c=n-1);r[c].loaded||B.clearRect(0,0,m[1].width,m[1].height);a.imaginaryID=c;console.log(l.dir+r[c].url[0]);a.src=l.dir+r[c].url[0];u=c;for(var e=0,d=c-1;d>c-l.imgprebuffer-1&&0<=d;d--)r[d].loaded||(w[e].imaginaryID=d,w[e].src=l.dir+r[d].url,e++);e=0;for(d=c+1;df;f++)e[f].indexOf("Y")+1?e[f]=c.getYear()-100:e[f].indexOf("M")+1?e[f]=c.getMonth()+1:e[f].indexOf("D")+1&&(e[f]=c.getDate());f=e.join("/");break;default:f+=e}cG.verbose(1,a,"Pushing state:",f);cG.fBox.pgepsh&&history.pushState({},null,"#/"+f)}if(void 0!==cG.queue.stageChange)for(var q in cG.queue.stageChange)if(cG.queue.stageChange.hasOwnProperty(q))cG.queue.stageChange[q](cG.cPanel[a]); +q=cG.cPanel[a].data(cG.cPanel[a].current()).special;f=document.getElementById(a+"_tempScript");c=cG.HELPERS.stick(cG.cPanel[a].canvi[0],null,null,0);e=cG.HELPERS.stick(cG.cPanel[a].canvi[1],null,null,1);void 0!==f&&null!==f&&(d.removeChild(f),c._show(),e._show());null!==q&&void 0!==q&&""!=q&&(f=document.createElement("SPAN"),f.setAttribute("id",a+"_tempScript"),f.innerHTML=q,d.appendChild(f),c._hide(),e._hide())});cG.comix=cG.fBox.protect?cG.comix||e:e;return e}}};cG.REPO.scReq=cG.REPO.scReq||{}; +cG.REPO.ctrls=cG.REPO.ctrls||{def:""};cG.REPO.decor=cG.REPO.decor||{def:""};cG.REPO.script=cG.REPO.script||{def:""};cG.agent=cG.REPO.agent.def;cG.director=cG.REPO.director.def;cG.producer=cG.REPO.producer.def;cG.ctrls=cG.REPO.ctrls.def;cG.decor=cG.REPO.decor.def;cG.script=cG.REPO.script.def;cG.stage=cG.REPO.stage.def;cG.HELPERS={}; +!function(){for(var a,c,d=document.getElementsByTagName("SCRIPT"),f=0;f
  • ',f,g=function(a,c){a.setAttribute("mind", -1);document.getElementById(a.id+"_location").title=cG.cPanel[a.id].data().hover;for(var d=a.getAttribute("comix")?document.getElementsByClassName("cgtitle"):[],e,f=a.getAttribute("comix")?document.getElementsByClassName("cgdate"):[],g=0;g
  • ', +f,g=function(a,c){a.setAttribute("mind",1);document.getElementById(a.id+"_location").title=cG.cPanel[a.id].data().hover;for(var e=a.getAttribute("comix")?document.getElementsByClassName("cgtitle"):[],d,f=a.getAttribute("comix")?document.getElementsByClassName("cgdate"):[],g=0;g
  • ', +f=f.children[0],c[a].getAttribute("comix")?f.setAttribute("style","display:block;"):f.setAttribute("style","display:none;"),f.setAttribute("cglink",c[a].id),c[a].parentNode.insertBefore(f,c[a].nextSibling),cG.cPanel[c[a].id].brains=cG.cPanel[c[a].id].brains||[],cG.cPanel[c[a].id].brains.push(f),g(c[a],f))}; cG.stageInjection=function(a){if(""===cG.script||""===cG.decor||""===cG.ctrls)return setTimeout(cG.stageInjection,300,a),cG.cPanel;if(!cG.script)return console.error("No script.JSON found. script.JSON is REQUIRED to create any stage. Please create a script.JSON or move it to the directory specified in the script tag for comix-ngn or bellerophon if it is added.");var c=[];if(void 0===a)c=document.getElementsByClassName("venue");else if(Array.isArray(a)){if(0
    Archive
    About Me
    ',d=[],q=function(a,e){var u; -if(null===e||void 0===e)if(u=c[a].getAttribute("script"),""==u||"script.json"==u||void 0===u||null===u)u=cG.script;else return d.push(cG.agent(u).then(function(c,d){q(a,c)},function(c,d){console.error(c,d.status);q(a,"")})),0;else u=""==e?cG.script:e;var n=c[a].getAttribute("id"),z=c[a].getAttribute("use"),r=c[a].getAttribute("config");c[a].setAttribute("cgcij",1);if(""==n||void 0===n||null===n){for(var n="STG"+a,p=1;document.getElementById(n);)n="STG"+(a+p++);n=n.toString();c[a].setAttribute("id", -n)}if(""==z||void 0===z||null===z)z="def";if(""!=r)try{r=JSON.parse(r)}catch(A){console.debug("The following configuration settings are malformed for plugin["+z+"]: ",r,"\nIt has been ignored"),r={}}else r={};for(var z=[],p=[],t=c[a].children,h=0;h"+(m+D)+"";for(m=0;m"+(m+k)+"",w=w+"
  • "+(m+k)+"
      ",B=u.chapters[m].start;B"+(B+D)+"";w+="
  • "}l+="";y+="";w+="";if(""==h.innerHTML||"Archive"==h.innerHTML)h.innerHTML=w+l+y}h=n;f[h]=cG.stage.construct(n,u,t,r);c[a].getAttribute("id")==cG.comix.name&&c[a].setAttribute("comix",1);l=c[a].children;for(y=1;y=cG.script.pages.length)a=a[0];else{var f,c=cG.script.pages;switch(a.length){case 1:a= -a[0];break;case 2:a[0]g;g++)f[g].indexOf("Y")+1?f[g]=0:f[g].indexOf("M")+1?f[g]=1:f[g].indexOf("D")+1&&(f[g]=2);1900=e){if(void 0===g.count||0!=g.count){f=Object.keys(g);for(var d=0;d
    Archive
    About Me
    ', +e=[],p=function(a,d){cG.fBox.noverwrite||(c[a].innerHTML="");var t;if(null===d||void 0===d)if(t=c[a].getAttribute("script"),""==t||"script.json"==t||void 0===t||null===t)t=cG.script;else return e.push(cG.agent(t).then(function(c,e){p(a,c)},function(c,e){console.error(c,e.status);p(a,"")})),0;else t=""==d?cG.script:d;t.config.additive&&(cG.addRender(null,null,t.config.additive),t.config.additive="");var q=c[a].getAttribute("id"),z=c[a].getAttribute("use"),r=c[a].getAttribute("config"),n=c[a].getAttribute("additive"); +""!=n&&void 0!==n&&null!==n&&(null===d||void 0===d?(t=cG.addRender(null,null,n),c[a].removeAttribute("additive")):t=cG.addRender(null,d,n));c[a].setAttribute("cgcij",1);if(""==q||void 0===q||null===q){q="STG"+a;for(n=1;document.getElementById(q);)q="STG"+(a+n++);q=q.toString();c[a].setAttribute("id",q)}if(""==z||void 0===z||null===z)z="def";if(""!=r)try{r=JSON.parse(r)}catch(A){console.debug("The following configuration settings are malformed for plugin["+z+"]: ",r,"\nIt has been ignored"),r={}}else r= +{};for(var z=[],n=[],u=c[a].children,h=0;h"+(m+D)+"";for(m=0;m"+(m+k)+"",w=w+"
  • "+(m+k)+"
      ",B=t.chapters[m].start;B"+(B+D)+"";w+="
  • "}l+="";y+="";w+=""; +if(""==h.innerHTML||"Archive"==h.innerHTML)h.innerHTML=w+l+y}h=q;f[h]=cG.stage.construct(q,t,u,r);cG.fBox.protect?c[a].getAttribute("id")==cG.comix.name&&c[a].setAttribute("comix",1):c[a].setAttribute("comix",-1);l=c[a].children;for(y=1;y=cG.script.pages.length)a=a[0];else{var f,c=cG.script.pages; +switch(a.length){case 1:a=a[0];break;case 2:a[0]g;g++)f[g].indexOf("Y")+1?f[g]=0:f[g].indexOf("M")+1?f[g]=1:f[g].indexOf("D")+1&&(f[g]=2);1900=d){if(void 0===g.count||0!=g.count){f=Object.keys(g);for(var e=0;ecomix-ngn - + -
    +
    +
  • + +
  • +
  • +
  • +
  • +
  • + +

    * Settings

    -
    +
    @@ -61,6 +89,17 @@

    Configuration

    + + + +
    + + + + + + +
    @@ -85,6 +124,10 @@

    Configuration

    + + L -> R  + R -> L
    @@ -126,7 +169,7 @@

    Chapters

    Pages

    - +
    @@ -143,8 +186,8 @@

    Pages

    * Design

    -   - +

    @@ -152,64 +195,69 @@

    * Design