fceux/web/help/js/app.min.js

6 lines
13 KiB
JavaScript
Raw Normal View History

"use strict";/*!
* HelpNDoc HTML template
* Copyright (C) IBE Software - All rights reserved.
* Can only be used in documentation generated by HelpNDoc: http://www.helpndoc.com
*/
var __extends=this&&this.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Exception=function(e){function t(t){var o=e.call(this,t)||this;return o.message=t,o.name="Exception",o.message=t,o}return __extends(t,e),t.prototype.toString=function(){return"["+this.name+']: "'+this.message+'"'},t}(Error),EInvalidHtmlElement=function(e){function t(t){var o=e.call(this,t)||this;return o.message=t,o.name="EInvalidHtmlElement",o}return __extends(t,e),t}(Exception),Hnd;!function(e){var t=function(){function e(){}return e}();e.AppOptions=t;var o=function(){function e(){}return e}();e.AppEvents=o;var n=function(){function e(e){this.DEFAULTS={animationDelay:200,elHeadroom:"header",elInlineTocContainer:"#inline-toc",elMask:".mask",elModal:"#hndModal",elSearchForm:"#search-form",elSearchInfo:"#search-info",elSearchInput:"#input-search",elToggler:".hnd-toggle",elTopicContainer:"article",elTopicContent:"#topic-content",elTreeContainers:".tree-container",elTreeSearch:"#search-tree",classNavExpandedSmall:"sm-nav-expanded",classNavExpandedMedium:"md-nav-expanded",inlineTocHeadings:"h1,h2,h3",searchEngineMinChars:3},this.EVENTS={onTopicChanged:null},this.TRANSLATIONS={"Search term too short":"Search term too short","No results":"No results","Please enter more characters":"Please enter more characters","Word list not ready yet. Please wait until the word list is fully downloaded":"Word list not ready yet. Please wait until the word list is fully downloaded","Incorrect or corrupt search data. Please check your HelpNDoc template":"Incorrect or corrupt search data. Please check your HelpNDoc template","Related topics...":"Related topics...","Loading...":"Loading...",Close:"Close"},this.options=$.extend({},this.DEFAULTS,e),this.Init()}return e.prototype._=function(e){var t=this.TRANSLATIONS[e];return t||e},e.prototype.doOnJsTreeError=function(e,t){console.error("JSTree Error",t);var o=e.find(".jstree-loading");o&&(t.error&&"ajax"==t.error?o.html('<strong>Loading Error</strong>: Please make sure your web-server is correctly configured to serve JSON files. <a href="https://www.helpndoc.com/sites/default/files/documentation/html/Tableofcontentsisemptyorloadingi.html">Learn more...</a>'):o.html("<strong>Error</strong>: please check your web-developer console for more information."))},e.prototype.doOnTopicChanged=function(e){this.EVENTS.onTopicChanged&&("string"==typeof e&&""!==e||(e=$(this.options.elTopicContent).data("hnd-id")+".html"),this.EVENTS.onTopicChanged(e))},e.prototype.doProcessParameters=function(){var e=URI(location.href),t=e.search(!0);t.tab&&""!=t.tab&&$("#tab-"+t.tab).tab("show"),t.search&&void 0!==t.search&&""!=t.search&&(this.$elSearchInput.val(t.search),this.$elSearchInput.keyup(),this.$elSearchForm.submit())},e.prototype.fixURI=function(e){return e.replace(/\%u00A0/g,"%20")},e.prototype.getAnchor=function(){return window.location.hash.substr(1)},e.prototype.isExternalLink=function(e){var t=function(e){return 0===e.indexOf("//")&&(e=location.protocol+e),e.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]};return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&t(location.href)!==t(e)||-1==["htm","html"].indexOf(new URI(e).suffix().toLowerCase())},e.prototype.DoShowExternalUrl=function(e,t,o){"mailto:"==t.substring(0,7).toLowerCase()?location.href=t:window.open(t,o)},e.prototype.DoShowTopic=function(e,t,o){var n=this;this.$elTopicContainer.load(o+" "+this.options.elTopicContent,function(e,i,r){var a=$(n.options.elTopicContent),s=a.data("hnd-id");if(window.history.pushState({id:s,title:t},t,o),"undefined"!=typeof ga&&ga)try{if(void 0!==ga.getAll&&ga.getAll&&ga.getAll()[0]){ga.getAll()[0].send("pageview",location.pathname)}else ga("send","pageview",location.pathname)}catch(e){console.error("[HND-APP] An error occurred while using