├── LICENSE ├── README.md ├── Src └── Pics │ ├── PN-主界面.png │ ├── PN-记笔记界面.png │ └── README ├── data ├── embededMarkdeepPreview.html ├── settingMain.table └── src │ ├── MathJax.js │ ├── context-menu.min.css │ ├── context-menu.min.js │ ├── fonts │ ├── remixicon.css │ ├── remixicon.eot │ ├── remixicon.glyph.json │ ├── remixicon.less │ ├── remixicon.svg │ ├── remixicon.symbol.svg │ ├── remixicon.ttf │ ├── remixicon.woff │ └── remixicon.woff2 │ ├── hotkeys.min.js │ ├── journal.css │ ├── jquery.min.js │ ├── latex.css │ ├── markdeep.min.js │ ├── pandanotes.js │ └── website.css ├── default.aproj ├── dlg ├── DoubleColsWebview2.aardio ├── ScreenCapture.aardio └── markdeepPreview.aardio ├── lib └── config.aardio ├── main.aardio └── res ├── panda.ico ├── panda.png └── spy.cur /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 YrracOwl 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 项目简介 2 | [点我下载.exe](https://github.com/YrracOwl/PandaNotes/releases/latest) 3 | 4 | 本项目是一个本地的markdown编辑器,实现了实时预览的功能,记笔记界面如下图所示。 5 | 6 | ![Figure [states]: PN-记笔记界面](Src/Pics/PN-记笔记界面.png) 7 | 8 | 由于此项目的markdown语法使用了markdeep实现,因此其支持markdeep的所有语法,预置了5种markdeep样式。 9 | 10 | - 默认样式 11 | - 日志样式 12 | - 网站样式 13 | - Latex样式 14 | - 幻灯片样式 15 | 16 | 有关于[markdeep](https://casual-effects.com/markdeep/)的语法参考[Feature Demo](https://casual-effects.com/markdeep/features.md.html)。 17 | 18 | ## 界面介绍 19 | 20 | ![Figure [states]: PN-主界面](Src//Pics/PN-主界面.png) 21 | 22 | 如上图所示,鼠标放上即可显示提示,分别实现了(从关闭按钮开始顺时针介绍) 23 | 24 | 25 | - [x] 关闭程序 26 | - [ ] 设置 27 | - [x] markdown编辑器 28 | - [x] 双开应用到“外部文档”栏 29 | - [x] 截图,可反色,保存时复制图片路径 30 | - [x] 置顶主界面 31 | 32 | 33 | ## 鸣谢 34 | 35 | 本项目的诞生离不开[markdeep](https://casual-effects.com/markdeep/)与[aardio](https://aardio.com),以及[webview2](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) 36 | 37 | ## Todo 38 | 39 | - [ ] 多标签页文档的打开 40 | - [ ] 保存时采用其他的通知方式,避免在通知时无法响应主页面 41 | - [ ] 打包出hugo的bundle类型post,将图片和.md文件打包到独立的文件夹;集成git命令,一键发布。 42 | - [ ] 主界面添加最小化按钮 43 | - [ ] 增加托盘图标 44 | - [ ] 截图界面保存时,自动复制的Figure代码需要将`Figure [states]`中的states修改为文件名 45 | -------------------------------------------------------------------------------- /Src/Pics/PN-主界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YrracOwl/PandaNotes/2637b74b98fb3c64a3384f759f8d44b9ab56d047/Src/Pics/PN-主界面.png -------------------------------------------------------------------------------- /Src/Pics/PN-记笔记界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YrracOwl/PandaNotes/2637b74b98fb3c64a3384f759f8d44b9ab56d047/Src/Pics/PN-记笔记界面.png -------------------------------------------------------------------------------- /Src/Pics/README: -------------------------------------------------------------------------------- 1 | for transmitting path 2 | -------------------------------------------------------------------------------- /data/embededMarkdeepPreview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 70 | 71 | 72 |
73 | 74 |
75 |
76 | 77 |
78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /data/settingMain.table: -------------------------------------------------------------------------------- 1 | { 2 | chkHex=true 3 | } -------------------------------------------------------------------------------- /data/src/MathJax.js: -------------------------------------------------------------------------------- 1 | /* 2 | * /MathJax.js 3 | * 4 | * Copyright (c) 2009-2018 The MathJax Consortium 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | if(document.getElementById&&document.childNodes&&document.createElement){if(!(window.MathJax&&MathJax.Hub)){if(window.MathJax){window.MathJax={AuthorConfig:window.MathJax}}else{window.MathJax={}}MathJax.isPacked=true;MathJax.version="2.7.5";MathJax.fileversion="2.7.5";MathJax.cdnVersion="2.7.5";MathJax.cdnFileVersions={};(function(d){var b=window[d];if(!b){b=window[d]={}}var e=[];var c=function(f){var g=f.constructor;if(!g){g=function(){}}for(var h in f){if(h!=="constructor"&&f.hasOwnProperty(h)){g[h]=f[h]}}return g};var a=function(){return function(){return arguments.callee.Init.call(this,arguments)}};b.Object=c({constructor:a(),Subclass:function(f,h){var g=a();g.SUPER=this;g.Init=this.Init;g.Subclass=this.Subclass;g.Augment=this.Augment;g.protoFunction=this.protoFunction;g.can=this.can;g.has=this.has;g.isa=this.isa;g.prototype=new this(e);g.prototype.constructor=g;g.Augment(f,h);return g},Init:function(f){var g=this;if(f.length===1&&f[0]===e){return g}if(!(g instanceof f.callee)){g=new f.callee(e)}return g.Init.apply(g,f)||g},Augment:function(f,g){var h;if(f!=null){for(h in f){if(f.hasOwnProperty(h)){this.protoFunction(h,f[h])}}if(f.toString!==this.prototype.toString&&f.toString!=={}.toString){this.protoFunction("toString",f.toString)}}if(g!=null){for(h in g){if(g.hasOwnProperty(h)){this[h]=g[h]}}}return this},protoFunction:function(g,f){this.prototype[g]=f;if(typeof f==="function"){f.SUPER=this.SUPER.prototype}},prototype:{Init:function(){},SUPER:function(f){return f.callee.SUPER},can:function(f){return typeof(this[f])==="function"},has:function(f){return typeof(this[f])!=="undefined"},isa:function(f){return(f instanceof Object)&&(this instanceof f)}},can:function(f){return this.prototype.can.call(this,f)},has:function(f){return this.prototype.has.call(this,f)},isa:function(g){var f=this;while(f){if(f===g){return true}else{f=f.SUPER}}return false},SimpleSUPER:c({constructor:function(f){return this.SimpleSUPER.define(f)},define:function(f){var h={};if(f!=null){for(var g in f){if(f.hasOwnProperty(g)){h[g]=this.wrap(g,f[g])}}if(f.toString!==this.prototype.toString&&f.toString!=={}.toString){h.toString=this.wrap("toString",f.toString)}}return h},wrap:function(i,h){if(typeof(h)!=="function"||!h.toString().match(/\.\s*SUPER\s*\(/)){return h}var g=function(){this.SUPER=g.SUPER[i];try{var f=h.apply(this,arguments)}catch(j){delete this.SUPER;throw j}delete this.SUPER;return f};g.toString=function(){return h.toString.apply(h,arguments)};return g}})});b.Object.isArray=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"};b.Object.Array=Array})("MathJax");(function(BASENAME){var BASE=window[BASENAME];if(!BASE){BASE=window[BASENAME]={}}var isArray=BASE.Object.isArray;var CALLBACK=function(data){var cb=function(){return arguments.callee.execute.apply(arguments.callee,arguments)};for(var id in CALLBACK.prototype){if(CALLBACK.prototype.hasOwnProperty(id)){if(typeof(data[id])!=="undefined"){cb[id]=data[id]}else{cb[id]=CALLBACK.prototype[id]}}}cb.toString=CALLBACK.prototype.toString;return cb};CALLBACK.prototype={isCallback:true,hook:function(){},data:[],object:window,execute:function(){if(!this.called||this.autoReset){this.called=!this.autoReset;return this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)))}},reset:function(){delete this.called},toString:function(){return this.hook.toString.apply(this.hook,arguments)}};var ISCALLBACK=function(f){return(typeof(f)==="function"&&f.isCallback)};var EVAL=function(code){return eval.call(window,code)};var TESTEVAL=function(){EVAL("var __TeSt_VaR__ = 1");if(window.__TeSt_VaR__){try{delete window.__TeSt_VaR__}catch(error){window.__TeSt_VaR__=null}}else{if(window.execScript){EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";window.execScript(code);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}else{EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";var head=(document.getElementsByTagName("head"))[0];if(!head){head=document.body}var script=document.createElement("script");script.appendChild(document.createTextNode(code));head.appendChild(script);head.removeChild(script);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}}TESTEVAL=null};var USING=function(args,i){if(arguments.length>1){if(arguments.length===2&&!(typeof arguments[0]==="function")&&arguments[0] instanceof Object&&typeof arguments[1]==="number"){args=[].slice.call(args,i)}else{args=[].slice.call(arguments,0)}}if(isArray(args)&&args.length===1&&typeof(args[0])==="function"){args=args[0]}if(typeof args==="function"){if(args.execute===CALLBACK.prototype.execute){return args}return CALLBACK({hook:args})}else{if(isArray(args)){if(typeof(args[0])==="string"&&args[1] instanceof Object&&typeof args[1][args[0]]==="function"){return CALLBACK({hook:args[1][args[0]],object:args[1],data:args.slice(2)})}else{if(typeof args[0]==="function"){return CALLBACK({hook:args[0],data:args.slice(1)})}else{if(typeof args[1]==="function"){return CALLBACK({hook:args[1],object:args[0],data:args.slice(2)})}}}}else{if(typeof(args)==="string"){if(TESTEVAL){TESTEVAL()}return CALLBACK({hook:EVAL,data:[args]})}else{if(args instanceof Object){return CALLBACK(args)}else{if(typeof(args)==="undefined"){return CALLBACK({})}}}}}throw Error("Can't make callback from given data")};var DELAY=function(time,callback){callback=USING(callback);callback.timeout=setTimeout(callback,time);return callback};var WAITFOR=function(callback,signal){callback=USING(callback);if(!callback.called){WAITSIGNAL(callback,signal);signal.pending++}};var WAITEXECUTE=function(){var signals=this.signal;delete this.signal;this.execute=this.oldExecute;delete this.oldExecute;var result=this.execute.apply(this,arguments);if(ISCALLBACK(result)&&!result.called){WAITSIGNAL(result,signals)}else{for(var i=0,m=signals.length;i0&&priority=0;i--){this.hooks.splice(i,1)}this.remove=[]}});var EXECUTEHOOKS=function(hooks,data,reset){if(!hooks){return null}if(!isArray(hooks)){hooks=[hooks]}if(!isArray(data)){data=(data==null?[]:[data])}var handler=HOOKS(reset);for(var i=0,m=hooks.length;ig){g=document.styleSheets.length}if(!i){i=document.head||((document.getElementsByTagName("head"))[0]);if(!i){i=document.body}}return i};var f=[];var c=function(){for(var k=0,j=f.length;k=this.timeout){i(this.STATUS.ERROR);return 1}return 0},file:function(j,i){if(i<0){a.Ajax.loadTimeout(j)}else{a.Ajax.loadComplete(j)}},execute:function(){this.hook.call(this.object,this,this.data[0],this.data[1])},checkSafari2:function(i,j,k){if(i.time(k)){return}if(document.styleSheets.length>j&&document.styleSheets[j].cssRules&&document.styleSheets[j].cssRules.length){k(i.STATUS.OK)}else{setTimeout(i,i.delay)}},checkLength:function(i,l,n){if(i.time(n)){return}var m=0;var j=(l.sheet||l.styleSheet);try{if((j.cssRules||j.rules||[]).length>0){m=1}}catch(k){if(k.message.match(/protected variable|restricted URI/)){m=1}else{if(k.message.match(/Security error/)){m=1}}}if(m){setTimeout(a.Callback([n,i.STATUS.OK]),0)}else{setTimeout(i,i.delay)}}},loadComplete:function(i){i=this.fileURL(i);var j=this.loading[i];if(j&&!j.preloaded){a.Message.Clear(j.message);clearTimeout(j.timeout);if(j.script){if(f.length===0){setTimeout(c,0)}f.push(j.script)}this.loaded[i]=j.status;delete this.loading[i];this.addHook(i,j.callback)}else{if(j){delete this.loading[i]}this.loaded[i]=this.STATUS.OK;j={status:this.STATUS.OK}}if(!this.loadHooks[i]){return null}return this.loadHooks[i].Execute(j.status)},loadTimeout:function(i){if(this.loading[i].timeout){clearTimeout(this.loading[i].timeout)}this.loading[i].status=this.STATUS.ERROR;this.loadError(i);this.loadComplete(i)},loadError:function(i){a.Message.Set(["LoadFailed","File failed to load: %1",i],null,2000);a.Hub.signal.Post(["file load error",i])},Styles:function(k,l){var i=this.StyleString(k);if(i===""){l=a.Callback(l);l()}else{var j=document.createElement("style");j.type="text/css";this.head=h(this.head);this.head.appendChild(j);if(j.styleSheet&&typeof(j.styleSheet.cssText)!=="undefined"){j.styleSheet.cssText=i}else{j.appendChild(document.createTextNode(i))}l=this.timer.create.call(this,l,j)}return l},StyleString:function(n){if(typeof(n)==="string"){return n}var k="",o,m;for(o in n){if(n.hasOwnProperty(o)){if(typeof n[o]==="string"){k+=o+" {"+n[o]+"}\n"}else{if(a.Object.isArray(n[o])){for(var l=0;l="0"&&q<="9"){f[j]=p[f[j]-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{if(q==="{"){q=f[j].substr(1);if(q>="0"&&q<="9"){f[j]=p[f[j].substr(1,f[j].length-2)-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{var k=f[j].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);if(k){if(k[1]==="plural"){var d=p[k[2]-1];if(typeof d==="undefined"){f[j]="???"}else{d=this.plural(d)-1;var h=k[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uEFEF").split(/\|/);if(d>=0&&d=3){c.push([f[0],f[1],this.processSnippet(g,f[2])])}else{c.push(e[d])}}}}else{c.push(e[d])}}return c},markdownPattern:/(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,processMarkdown:function(b,h,d){var j=[],e;var c=b.split(this.markdownPattern);var g=c[0];for(var f=1,a=c.length;f1?d[1]:""));f=null}if(e&&(!b.preJax||d)){c.nodeValue=c.nodeValue.replace(b.postJax,(e.length>1?e[1]:""))}if(f&&!f.nodeValue.match(/\S/)){f=f.previousSibling}}if(b.preRemoveClass&&f&&f.className===b.preRemoveClass){a.MathJax.preview=f}a.MathJax.checked=1},processInput:function(a){var b,i=MathJax.ElementJax.STATE;var h,e,d=a.scripts.length;try{while(a.ithis.processUpdateTime&&a.i1){d.jax[a.outputJax].push(b)}b.MathJax.state=c.OUTPUT},prepareOutput:function(c,f){while(c.jthis.processUpdateTime&&h.i=0;q--){if((b[q].src||"").match(f)){s.script=b[q].innerHTML;if(RegExp.$2){var t=RegExp.$2.substr(1).split(/\&/);for(var p=0,l=t.length;p=parseInt(y[z])}}return true},Select:function(j){var i=j[d.Browser];if(i){return i(d.Browser)}return null}};var e=k.replace(/^Mozilla\/(\d+\.)+\d+ /,"").replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"").replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,"");d.Browser=d.Insert(d.Insert(new String("Unknown"),{version:"0.0"}),a);for(var v in a){if(a.hasOwnProperty(v)){if(a[v]&&v.substr(0,2)==="is"){v=v.slice(2);if(v==="Mac"||v==="PC"){continue}d.Browser=d.Insert(new String(v),a);var r=new RegExp(".*(Version/| Trident/.*; rv:)((?:\\d+\\.)+\\d+)|.*("+v+")"+(v=="MSIE"?" ":"/")+"((?:\\d+\\.)*\\d+)|(?:^|\\(| )([a-z][-a-z0-9._: ]+|(?:Apple)?WebKit)/((?:\\d+\\.)+\\d+)");var u=r.exec(e)||["","","","unknown","0.0"];d.Browser.name=(u[1]!=""?v:(u[3]||u[5]));d.Browser.version=u[2]||u[4]||u[6];break}}}try{d.Browser.Select({Safari:function(j){var i=parseInt((String(j.version).split("."))[0]);if(i>85){j.webkit=j.version}if(i>=538){j.version="8.0"}else{if(i>=537){j.version="7.0"}else{if(i>=536){j.version="6.0"}else{if(i>=534){j.version="5.1"}else{if(i>=533){j.version="5.0"}else{if(i>=526){j.version="4.0"}else{if(i>=525){j.version="3.1"}else{if(i>500){j.version="3.0"}else{if(i>400){j.version="2.0"}else{if(i>85){j.version="1.0"}}}}}}}}}}j.webkit=(navigator.appVersion.match(/WebKit\/(\d+)\./))[1];j.isMobile=(navigator.appVersion.match(/Mobile/i)!=null);j.noContextMenu=j.isMobile},Firefox:function(j){if((j.version==="0.0"||k.match(/Firefox/)==null)&&navigator.product==="Gecko"){var m=k.match(/[\/ ]rv:(\d+\.\d.*?)[\) ]/);if(m){j.version=m[1]}else{var i=(navigator.buildID||navigator.productSub||"0").substr(0,8);if(i>="20111220"){j.version="9.0"}else{if(i>="20111120"){j.version="8.0"}else{if(i>="20110927"){j.version="7.0"}else{if(i>="20110816"){j.version="6.0"}else{if(i>="20110621"){j.version="5.0"}else{if(i>="20110320"){j.version="4.0"}else{if(i>="20100121"){j.version="3.6"}else{if(i>="20090630"){j.version="3.5"}else{if(i>="20080617"){j.version="3.0"}else{if(i>="20061024"){j.version="2.0"}}}}}}}}}}}}j.isMobile=(navigator.appVersion.match(/Android/i)!=null||k.match(/ Fennec\//)!=null||k.match(/Mobile/)!=null)},Chrome:function(i){i.noContextMenu=i.isMobile=!!navigator.userAgent.match(/ Mobile[ \/]/)},Opera:function(i){i.version=opera.version()},Edge:function(i){i.isMobile=!!navigator.userAgent.match(/ Phone/)},MSIE:function(j){j.isMobile=!!navigator.userAgent.match(/ Phone/);j.isIE9=!!(document.documentMode&&(window.performance||window.msPerformance));MathJax.HTML.setScriptBug=!j.isIE9||document.documentMode<9;MathJax.Hub.msieHTMLCollectionBug=(document.documentMode<9);if(document.documentMode<10&&!s.params.NoMathPlayer){try{new ActiveXObject("MathPlayer.Factory.1");j.hasMathPlayer=true}catch(m){}try{if(j.hasMathPlayer){var i=document.createElement("object");i.id="mathplayer";i.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";g.appendChild(i);document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");j.mpNamespace=true;if(document.readyState&&(document.readyState==="loading"||document.readyState==="interactive")){document.write('');j.mpImported=true}}else{document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink")}}catch(m){}}}})}catch(c){console.error(c.message)}d.Browser.Select(MathJax.Message.browsers);if(h.AuthorConfig&&typeof h.AuthorConfig.AuthorInit==="function"){h.AuthorConfig.AuthorInit()}d.queue=h.Callback.Queue();d.queue.Push(["Post",s.signal,"Begin"],["Config",s],["Cookie",s],["Styles",s],["Message",s],function(){var i=h.Callback.Queue(s.Jax(),s.Extensions());return i.Push({})},["Menu",s],s.onLoad(),function(){MathJax.isReady=true},["Typeset",s],["Hash",s],["MenuZoom",s],["Post",s.signal,"End"])})("MathJax")}}; 20 | -------------------------------------------------------------------------------- /data/src/context-menu.min.css: -------------------------------------------------------------------------------- 1 | .context-menu{display:flex;flex-direction:column;position:absolute;background-color:#FFFFFF;box-sizing:border-box;box-shadow:1px 1px 3px rgba(0,0,0,0.2),0 0 0 1px #eee;border-radius:2px;white-space:nowrap;vertical-align:top;overflow:hidden;user-select:none;animation:0.1s context-popup}.context-menu-search{padding:6px 6px;border-bottom:1px solid #EEEEEE}.context-menu-search>input{display:block;min-width:250px;width:100%;height:30px;padding:10px 6px;box-sizing:border-box;border:1px solid #EEEEEE;border-radius:2px;box-shadow:0 1px 2px rgba(0,0,0,0.1);font-size:10.5pt;color:#616161;transition:0.1s border-color}.context-menu-search>input:focus{border-color:#64B5F6}.context-menu-search>input::-webkit-input-placeholder{color:#9E9E9E}.context-menu-search>input:-moz-placeholder{color:#9E9E9E}.context-menu-search>input::-moz-placeholder{color:#9E9E9E}.context-menu-search>input:-ms-input-placeholder{color:#9E9E9E}.context-menu-options{padding:6px 0;overflow-x:hidden;overflow-y:auto}.context-menu-options::-webkit-scrollbar{width:5px;background-color:transparent}.context-menu-options::-webkit-scrollbar-thumb{width:5px;background-color:rgba(0,144,209,0.5);border-radius:5px}.context-menu-options::-webkit-scrollbar-thumb:hover,.context-menu-options::-webkit-scrollbar-thumb:active{background-color:#0090d1}.context-menu-option,.context-menu-submenu,.context-menu-disabled{position:relative;padding:6px 30px 6px 14px;font-size:11pt;font-weight:300;color:#616161}.context-menu-option,.context-menu-submenu{cursor:pointer}.context-menu-option.active,.active.context-menu-submenu,.context-menu-option.active-submenu,.active-submenu.context-menu-submenu{color:#4393E6;background-color:rgba(67,147,230,0.1)}.context-menu-submenu{padding-right:30px}.context-menu-submenu:after{content:"\25B6";font-size:8pt;display:block;position:absolute;top:50%;transform:translate(0, -50%) scaleX(0.8);right:8px}.context-menu-separator{padding:4px 0}.context-menu-disabled{opacity:0.5;cursor:default}.option-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:5px;user-select:none}.option-text,.option-arrow{display:inline-flex;align-items:center;user-select:none}.option-separator{height:1px;border:none;border-top:1px solid #EEEEEE}@keyframes context-popup{0%{opacity:0}100%{opacity:1}} 2 | -------------------------------------------------------------------------------- /data/src/context-menu.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Super Context Menu 3 | * Created by EZ17-1, pwnedgod @ github 4 | */ 5 | "use strict";window.superCm=function(c){var d={minWidth:null,maxHeight:null,autoClose:!1,searchBar:!1,searchBarPlaceholder:"Search...",zIndex:50},s=$("
").addClass("context-menu").append($("
").addClass("context-menu-options")),p=$("
"),a=$("
").addClass("context-menu-search").append($("").prop({type:"text",placeholder:d.searchBarPlaceholder})),m=$("").addClass("option-icon"),h=$("").addClass("option-text"),f=$("
").addClass("option-separator"),x=[],v=null;function l(e,n){e=x[e];return e.search.result&&!n?e.search.result:e.opts}function g(e){return x[e].element.find(".context-menu-options")}function w(e){return g(e).children()}function b(e,n){return g(e).children().eq(n)}function I(n,t){if(null==v||v.cmIndex!=n||v.optIndex!=t){if(null!=v){let e=b(v.cmIndex,v.optIndex);e.hasClass("active")&&e.removeClass("active")}if(-1!=n&&-1!=t){let e=b(n,t);e.hasClass("active")||e.addClass("active"),v={cmIndex:n,optIndex:t}}else v=null}}function C(n,t){var o=x[n].activeSubmenu;if(o!=t){if(-1!=o){let e=b(n,o);e.hasClass("active-submenu")&&e.removeClass("active-submenu")}if(-1!=t){let e=b(n,t);e.hasClass("active-submenu")||e.addClass("active-submenu")}x[n].activeSubmenu=t}}function y(n){void 0===n&&(n=0),null!=v&&n<=v.cmIndex&&I(-1,-1);for(let e=x.length-1;e>=n;e--)x.pop().element.remove()}function u(c){var r=x[c],n=l(c,!1);(n=0==n.length?[{label:"< Empty >",disabled:!0}]:n).forEach(function(n,t){var e=b(c,t),o=void 0!==n.separator,i=void 0!==n.icon&&n.icon,s=void 0!==n.label&&n.label,a=void 0!==n.disabled&&n.disabled,l=void 0!==n.action&&n.action,u=void 0!==n.submenu&&n.submenu;if(e.length?(e.empty(),e.off(),e.removeClass()):(e=p.clone()).appendTo(g(c)),o)return e.hasClass("context-menu-separator")||e.addClass("context-menu-separator"),void e.append(f.clone());i&&e.append(m.clone().addClass(n.icon)),s&&e.append(h.clone().html(n.label)),a?e.hasClass("context-menu-disabled")||e.addClass("context-menu-disabled"):(l&&e.click(function(){d.autoClose?y():(y(c+1),C(c,-1)),n.action(n,c,t)}),u?(e.on("submenu",function(){var e;r.activeSubmenu!=t&&(e=c+1,C(c,t),y(e),M(n.submenu,e,{x:r.position.x+r.element.outerWidth(),y:r.position.y+this.offsetTop-this.parentElement.scrollTop-parseInt(g(c).css("padding-top"))}))}),e.mouseenter(function(){I(c,t),$(this).trigger("submenu")}),e.hasClass("context-menu-submenu")||e.addClass("context-menu-submenu")):(e.mouseenter(function(){I(c,t),C(c,-1),y(c+1)}),e.hasClass("context-menu-option")||e.addClass("context-menu-option")),e.mouseleave(function(){v.cmIndex==c&&v.optIndex==t&&I(-1,-1)}))});var t=w(c);for(let e=t.length-1;e>=n.length;e--)t.eq(e).remove()}function r(e,n,t){void 0===n&&(n=!0),void 0===t&&(t=!0);var o,i,s=x[e];0=$(window).innerWidth()&&(s.position.x-=n,0=$(window).innerHeight()&&(s.position.y-=u,0d.maxHeight&&s.element.css("height",d.maxHeight):s.element.css("max-height",d.maxHeight),null!==d.minWidth&&s.element.css("min-width",d.minWidth),s.element.css("z-index",d.zIndex+e)}function T(e){var n=x[e];if(null!==n.search.input){var t=n.search.input.val().trim();if(""==t)return n.search.result=null,void u(e);I(-1,-1);e=[];!function o(i,e,s){e.forEach(function(e){var n,t=!1;void 0===e.label||!e.label||(n=e.label.toLowerCase())&&-1!=n.indexOf(s)&&(i.push(e),t=!0),!t&&void 0!==e.submenu&&e.submenu.length&&o(i,e.submenu,s)})}(e,n.opts,t.toLowerCase()),n.search.result=e}}function M(e,n,t){var o,i=s.clone();d.searchBar&&0==n&&(o=a.clone()).prependTo(i);e={element:i,position:t,opts:e,activeSubmenu:-1,search:{input:o?o.find("input"):null,result:null}};x.push(e),g(n).scroll(function(){C(n,-1),y(n+1)}),I(-1,-1),v={cmIndex:n,optIndex:-1},i.appendTo(document.body),u(n),r(n),o&&e.search.input.on("input",function(){y(n+1),T(n),u(n),r(n,!0,!1)}).focus()}function o(e,n,t){var o=w(e);n>=o.length?n=0:n<0&&(n=o.length-1);for(var i,s=n;i=s,void 0!==(i=l(e,!1)[i]).separator||void 0!==i.disabled&&i.disabled;){if((s+=t?-1:1)==n)return-1;s>=o.length?s=0:s<0&&(s=o.length-1)}return s}return $(document).on("mousedown.scm contextmenu.scm",".context-menu, .opt-text, .opt-icon, .opt-separator",function(e){e.stopPropagation()}),$(document).on("keydown.scm",function(e){var n,t;"Escape"!=e.key&&27!=e.which||y(),0 http://jaywcjlove.github.io/hotkeys */ 2 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).hotkeys=t()}(this,function(){"use strict";var e="undefined"!=typeof navigator&&0