UNPKG

@mhg/blog

Version:
3 lines (2 loc) 21.7 kB
"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),c=new C(r||[]);return o(a,"_invoke",{value:_(e,n,c)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",m="suspendedYield",h="executing",g="completed",f={};function y(){}function v(){}function b(){}var M={};s(M,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(O([])));x&&x!==n&&r.call(x,a)&&(M=x);var k=b.prototype=y.prototype=Object.create(M);function L(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==_typeof(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(u).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,n,r){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=E(c,r);if(l){if(l===f)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw (o=g, r.arg);r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=d(t,n,r);if("normal"===s.type){if(o=r.done?g:m,s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}};}function E(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator["return"]&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,f;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,f):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(_typeof(t)+" is not iterable")}return v.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},L(R.prototype),s(R.prototype,c,(function(){return this})),t.AsyncIterator=R,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new R(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},L(k),s(k,l,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function o(){for(;n.length;){var e=n.pop();if(e in t)return o.value=e,o.done=!1,o}return o.done=!0,o}},t.values=O,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),f}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),f}},t}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(r,o)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){asyncGeneratorStep(i,r,o,a,c,"next",e)}function c(e){asyncGeneratorStep(i,r,o,a,c,"throw",e)}a(undefined)}))}}var RightMenus={defaultEvent:["copyText","copyLink","copyPaste","copyAll","copyCut","copyImg","printMode","readMode"],defaultGroup:["navigation","inputBox","seletctText","elementCheck","elementImage","articlePage"],messageRightMenu:volantis.GLOBAL_CONFIG.plugins.message.enable&&volantis.GLOBAL_CONFIG.plugins.message.rightmenu.enable,corsAnywhere:volantis.GLOBAL_CONFIG.plugins.rightmenus.options.corsAnywhere,urlRegx:/^((https|http)?:\/\/)+[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/,imgRegx:/\.(jpe?g|png|webp|svg|gif|jifi)(-|_|!|\?|\/)?.*$/,initialMenu:function(){RightMenus.fun.init(),volantis.pjax.send((function(){RightMenus.fun.hideMenu(),volantis.isReadModel&&RightMenus.fun.readMode()}))},readClipboard:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function t(){var e,n;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,navigator.permissions.query({name:"clipboard-read"});case 2:n=t.sent,t.t0=n.state,t.next="granted"===t.t0||"prompt"===t.t0?6:10;break;case 6:return t.next=8,navigator.clipboard.readText();case 8:return e=t.sent,t.abrupt("break",12);case 10:return window.clipboardRead=!1,t.abrupt("break",12);case 12:return t.abrupt("return",e);case 13:case"end":return t.stop()}}),t)})));return function(){return e.apply(this,arguments)}}(),writeClipText:function(e){return navigator.clipboard.writeText(e).then((function(){return Promise.resolve()}))["catch"]((function(e){return Promise.reject(e)}))},writeClipImg:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function t(e,n,r){var o;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(o=new Image).crossOrigin="Anonymous",o.addEventListener("load",(function(){var e=document.createElement("canvas"),t=e.getContext("2d");e.width=o.width,e.height=o.height,t.drawImage(o,0,0),e.toBlob((function(e){navigator.clipboard.write([new ClipboardItem({"image/png":e})]).then((function(e){n(e)}))["catch"]((function(e){r(e)}))}),"image/png")}),!1),o.src="".concat(e,"?(lll¬ω¬)");case 4:case"end":return t.stop()}}),t)})));return function(t,n,r){return e.apply(this,arguments)}}(),insertAtCaret:function(e,t){var n=e.selectionStart,r=e.selectionEnd;if(document.selection)e.focus(),document.selection.createRange().text=t,e.focus();else if(n||"0"==n){var o=e.scrollTop;e.value=e.value.substring(0,n)+t+e.value.substring(r,e.value.length),e.focus(),e.selectionStart=n+t.length,e.selectionEnd=n+t.length,e.scrollTop=o}else e.value+=t,e.focus()}};RightMenus.fun=function(){var e=volantis.GLOBAL_CONFIG.plugins.rightmenus,t={},n=document.getElementById("rightmenu-wrapper"),r=document.getElementById("rightmenu-content"),o=document.querySelectorAll("#rightmenu-content li.menuLoad-Content"),i=document.querySelectorAll("#rightmenu-content li, #rightmenu-content hr, #menuMusic"),a=document.getElementById("read_bkg"),c=document.getElementById("menuMusic"),l=document.querySelector("#menuMusic .backward"),s=document.querySelector("#menuMusic .toggle"),u=document.querySelector("#menuMusic .forward"),d={mouseEvent:null,isInputBox:!1,selectText:"",inputValue:"",isLink:!1,linkUrl:"",isMediaLink:!1,mediaLinkUrl:"",isImage:!1,isArticle:!1,pathName:"",isReadClipboard:!0,isShowMusic:!1,statusCheck:!1},p=Object.assign({},d);return t.initEvent=function(){t.elementAppend(),t.contextmenu(),t.menuEvent()},t.elementAppend=function(){a&&a.parentNode.removeChild(a);var e=document.createElement("div");e.className="common_read_bkg common_read_hide",e.id="read_bkg",window.document.body.appendChild(e)},t.menuPosition=function(e){try{var o=e.clientX,i=e.clientY,a=document.documentElement.clientWidth||document.body.clientWidth,c=document.documentElement.clientHeight||document.body.clientHeight;n.style.display="block",t.menuControl(e);var l=r.offsetWidth,s=r.offsetHeight,u=o+l>a?o-l+10:o,d=i+s>c?i-s+10:i;d=i+s>c&&d<s&&i<s?d+(c-s-d-10):d,n.style.left="".concat(u,"px"),n.style.top="".concat(d,"px"),volantis.GLOBAL_CONFIG.plugins.message.rightmenu.notice&&t.menuNotic()}catch(p){return console.error(p),t.hideMenu(),!0}return!1},t.menuControl=function(n){t.globalDataSet(n),c&&(c.style.display=d.isShowMusic?"block":"none"),o.forEach((function(t){t.style.display="none";var n=t.firstElementChild.nodeName,r=t.firstElementChild.getAttribute("data-group"),o=t.firstElementChild.getAttribute("data-event");if(d.statusCheck||d.isArticle)switch(r){case"inputBox":d.isInputBox&&(t.style.display="block","copyCut"!==o||d.selectText||(t.style.display="none"),"copyAll"!==o||d.inputValue||(t.style.display="none"),"copyPaste"!==o||d.isReadClipboard||(t.style.display="none"));break;case"seletctText":d.selectText&&(t.style.display="block");break;case"elementCheck":(d.isLink||d.isMediaLink)&&(t.style.display="block");break;case"elementImage":d.isImage&&(t.style.display="block");break;case"articlePage":d.isArticle&&(t.style.display="block");break;default:t.style.display="A"===n?d.isArticle&&!d.statusCheck&&e.options.articleShowLink?"block":"none":"block"}else("A"===n||RightMenus.defaultGroup.every((function(e){return r!==e})))&&(t.style.display="block")})),volantis.mouseEvent=n,volantis.rightmenu.method.handle.start();var r={item:null,hide:!0};i.forEach((function(e){if("HR"===e.nodeName){if(e.style.display="block",!r.item)return void(r.item=e);(r.hide||"hr"===r.item.nextElementSibling.nodeName)&&(r.item.style.display="none"),r.item=e,r.hide=!0}else"block"===e.style.display&&r.hide&&(r.hide=!1)})),r.item&&r.hide&&(r.item.style.display="none")},t.globalDataSet=function(t){var n;(d=Object.assign({},p)).mouseEvent=t,d.selectText=window.getSelection().toString(),"input"!==t.target.tagName.toLowerCase()&&"textarea"!==t.target.tagName.toLowerCase()||(d.isInputBox=!0,d.inputValue=t.target.value),d.isInputBox&&!1===window.clipboardRead&&(d.isReadClipboard=!1),t.target.href&&RightMenus.urlRegx.test(t.target.href)&&(d.isLink=!0,d.linkUrl=t.target.href),t.target.currentSrc&&RightMenus.urlRegx.test(t.target.currentSrc)&&(d.isMediaLink=!0,d.mediaLinkUrl=t.target.currentSrc),d.isMediaLink&&RightMenus.imgRegx.test(d.mediaLinkUrl)&&(d.isImage=!0),document.querySelector("#post.article")&&(d.isArticle=!0,d.pathName=window.location.pathname),null!==(n=volantis.GLOBAL_CONFIG.plugins.aplayer)&&void 0!==n&&n.enable&&"undefined"!=typeof RightMenuAplayer&&RightMenuAplayer.APlayer.player!==undefined&&(e.options.musicAlwaysShow||"play"===RightMenuAplayer.APlayer.status||"undefined"===RightMenuAplayer.APlayer.status)&&(d.isShowMusic=!0),(d.selectText||d.isInputBox||d.isLink||d.isMediaLink)&&(d.statusCheck=!0)},t.contextmenu=function(){window.document.oncontextmenu=function(e){return e.ctrlKey||document.body.offsetWidth<=500?(t.hideMenu(),!0):t.menuPosition(e)},n.oncontextmenu=function(e){return e.stopPropagation(),e.preventDefault(),!1},window.removeEventListener("blur",t.hideMenu),window.addEventListener("blur",t.hideMenu),document.body.removeEventListener("click",t.hideMenu),document.body.addEventListener("click",t.hideMenu)},t.menuEvent=function(){o.forEach((function(n){var r=n.firstElementChild.getAttribute("data-event"),o=n.firstElementChild.getAttribute("id"),i=n.firstElementChild.getAttribute("data-group");"A"!==n.firstElementChild.nodeName&&n.addEventListener("click",(function(){try{RightMenus.defaultEvent.every((function(e){return r!==e}))?"seletctText"===i?RightMenusFunction[o](d.selectText):"elementCheck"===i?RightMenusFunction[o](d.isLink?d.linkUrl:d.mediaLinkUrl):"elementImage"===i?RightMenusFunction[o](d.mediaLinkUrl):RightMenusFunction[o]():t[r]()}catch(n){"rightMenus"===volantis.GLOBAL_CONFIG.debug&&console.error({id:o,error:n,globalData:d,groupName:i,eventName:r}),RightMenus.messageRightMenu&&VolantisApp.message("错误提示",n,{icon:e.options.iconPrefix+" fa-exclamation-square red",time:"15000"})}}))})),u&&s&&u&&(l.onclick=function(e){e.preventDefault(),e.stopPropagation(),RightMenuAplayer.aplayerBackward()},s.onclick=function(e){e.preventDefault(),e.stopPropagation(),RightMenuAplayer.aplayerToggle()},u.onclick=function(e){e.preventDefault(),e.stopPropagation(),RightMenuAplayer.aplayerForward()})},t.hideMenu=function(){n.style.display=null,n.style.left=null,n.style.top=null},t.menuNotic=function(){var t="true"===localStorage.getItem("NoticeRightMenu");RightMenus.messageRightMenu&&!t&&VolantisApp.message("右键菜单","唤醒原系统菜单请使用:<kbd>Ctrl</kbd> + <kbd>右键</kbd>",{icon:e.options.iconPrefix+" fa-exclamation-square red",displayMode:1,time:9e3},(function(){localStorage.setItem("NoticeRightMenu","true")}))},t.copyText=function(){VolantisApp.utilWriteClipText(d.selectText).then((function(){RightMenus.messageRightMenu&&VolantisApp.messageCopyright()}))["catch"]((function(t){RightMenus.messageRightMenu&&VolantisApp.message("系统提示",t,{icon:e.options.iconPrefix+" fa-exclamation-square red",displayMode:1,time:9e3})}))},t.copyLink=function(){VolantisApp.utilWriteClipText(d.linkUrl||d.mediaLinkUrl).then((function(){RightMenus.messageRightMenu&&VolantisApp.messageCopyright()}))["catch"]((function(t){RightMenus.messageRightMenu&&VolantisApp.message("系统提示",t,{icon:e.options.iconPrefix+" fa-exclamation-square red",displayMode:1,time:9e3})}))},t.copyAll=function(){d.mouseEvent.target.select()},t.copyPaste=_asyncToGenerator(_regeneratorRuntime().mark((function m(){var e;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,RightMenus.readClipboard();case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0="";case 5:e=t.t0,RightMenus.messageRightMenu&&!1===window.clipboardRead?VolantisApp.message("系统提示","未授予剪切板读取权限!"):RightMenus.messageRightMenu&&""===e?VolantisApp.message("系统提示","仅支持复制文本内容!"):RightMenus.insertAtCaret(d.mouseEvent.target,e);case 7:case"end":return t.stop()}}),m)}))),t.copyCut=function(){var e=d.mouseEvent.target.selectionStart,n=d.mouseEvent.target.selectionEnd,r=d.inputValue;t.copyText(d.selectText),d.mouseEvent.target.value=r.substring(0,e)+r.substring(n,r.length),d.mouseEvent.target.selectionStart=e,d.mouseEvent.target.selectionEnd=e,d.mouseEvent.target.focus()},t.copyImg=function(){volantis.GLOBAL_CONFIG.plugins.message.rightmenu.notice&&VolantisApp.message("系统提示","复制中,请等待。",{icon:e.options.iconPrefix+" fa-images"}),RightMenus.writeClipImg(d.mediaLinkUrl,(function(t){RightMenus.messageRightMenu&&(VolantisApp.hideMessage(),VolantisApp.message("系统提示","图片复制成功!",{icon:e.options.iconPrefix+" fa-images"}))}),(function(t){console.error(t),RightMenus.messageRightMenu&&(VolantisApp.hideMessage(),VolantisApp.message("系统提示","复制失败:"+t,{icon:e.options.iconPrefix+" fa-exclamation-square red",time:9e3}))}))},t.printMode=function(){if(window.location.pathname===d.pathName)if(RightMenus.messageRightMenu){VolantisApp.question("",'是否打印当前页面?<br><em style="font-size: 80%">建议打印时勾选背景图形</em><br>',{time:9e3},(function(){t.printHtml()}))}else t.printHtml()},t.printHtml=function(){volantis.isReadModel&&t.readMode(),DOMController.setAttribute("details","open","true"),DOMController.removeList([".cus-article-bkg",".iziToast-overlay",".iziToast-wrapper",".prev-next","footer","#l_header","#l_cover","#l_side","#comments","#s-top","#BKG","#rightmenu-wrapper",".nav-tabs",".parallax-mirror",".new-meta-item.share",".new-meta-box","button.btn-copy","iframe"]),DOMController.setStyleList([["body","backgroundColor","unset"],["#l_main, .copyright.license","width","100%"],["#post","boxShadow","none"],["#post","background","none"],["#post","padding","0"],["h1","textAlign","center"],["h1","fontWeight","600"],["h1","fontSize","2rem"],["h1","marginBottom","20px"],[".tab-pane","display","block"],[".tab-content","borderTop","none"],[".highlight>table pre","whiteSpace","pre-wrap"],[".highlight>table pre","wordBreak","break-all"],[".fancybox img","height","auto"],[".fancybox img","weight","auto"],[".copyright.license","margin","0"],[".copyright.license","padding","1.25em 20px"],["figure.highlight, .copyright.license","display","inline-block"]]),setTimeout((function(){window.print(),document.body.innerHTML="",window.location.reload()}),50)},t.readMode=function(){"function"==typeof ScrollReveal&&ScrollReveal().clean("#comments"),DOMController.setStyle("#l_header","opacity",0),DOMController.fadeToggleList([document.querySelector("#l_cover"),document.querySelector("footer"),document.querySelector("#s-top"),document.querySelector(".article-meta#bottom"),document.querySelector(".prev-next"),document.querySelector("#l_side"),document.querySelector("#comments")]),DOMController.toggleClassList([[document.querySelector("#l_main"),"common_read"],[document.querySelector("#l_main"),"common_read_main"],[document.querySelector("#l_body"),"common_read"],[document.querySelector("#safearea"),"common_read"],[document.querySelector("#pjax-container"),"common_read"],[document.querySelector("#read_bkg"),"common_read_hide"],[document.querySelector("h1"),"common_read_h1"],[document.querySelector("#post"),"post_read"],[document.querySelector("#l_cover"),"read_cover"],[document.querySelector(".widget.toc-wrapper"),"post_read"]]),DOMController.setStyle(".copyright.license","margin","15px 0"),volantis.isReadModel=volantis.isReadModel===undefined||!volantis.isReadModel,volantis.isReadModel?(RightMenus.messageRightMenu&&VolantisApp.message("系统提示","阅读模式已开启,您可以点击屏幕空白处退出。",{backgroundColor:"var(--color-read-post)",icon:e.options.iconPrefix+" fa-book-reader",displayMode:1,time:5e3}),document.querySelector("#l_body").removeEventListener("click",t.readMode),document.querySelector("#l_body").addEventListener("click",(function(e){DOMController.hasClass(e.target,"common_read")&&t.readMode()}))):(document.querySelector("#l_body").removeEventListener("click",t.readMode),document.querySelector("#post").removeEventListener("click",t.readMode),DOMController.setStyle(".prev-next","display","flex"),DOMController.setStyle(".copyright.license","margin","15px -40px"))},{init:t.initEvent,hideMenu:t.hideMenu,readMode:t.readMode}}(),Object.freeze(RightMenus),volantis.requestAnimationFrame((function(){"loading"!==document.readyState?RightMenus.initialMenu():document.addEventListener("DOMContentLoaded",(function(){RightMenus.initialMenu()}))})); //# sourceMappingURL=../../maps/js/plugins/rightMenus.js.map