highlight.css000644 0000000143 14202726152010364 0ustar00000000 000000 span.cm-matchhighlight { background-color: #d7d4f0; } /*dark mode selected bg colour is 6b6b6b*/ index.js000644 0000007205 14202726152007356 0ustar00000000 000000 !function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(r,i){function u(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(u,a)}l((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const r=o(1),i=o(2);r.default.plugins.register({onStart:function(){return n(this,void 0,void 0,(function*(){yield r.default.contentScripts.register(i.ContentScriptType.CodeMirrorPlugin,"matchhighlight","./matchhighlight.js")}))}})},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=joplin},function(t,e,o){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ContentScriptType=e.SettingStorage=e.AppType=e.SettingItemType=e.ToolbarButtonLocation=e.isContextMenuItemLocation=e.MenuItemLocation=e.ModelType=e.ImportModuleOutputFormat=e.FileSystemItem=void 0,function(t){t.File="file",t.Directory="directory"}(e.FileSystemItem||(e.FileSystemItem={})),function(t){t.Markdown="md",t.Html="html"}(e.ImportModuleOutputFormat||(e.ImportModuleOutputFormat={})),function(t){t[t.Note=1]="Note",t[t.Folder=2]="Folder",t[t.Setting=3]="Setting",t[t.Resource=4]="Resource",t[t.Tag=5]="Tag",t[t.NoteTag=6]="NoteTag",t[t.Search=7]="Search",t[t.Alarm=8]="Alarm",t[t.MasterKey=9]="MasterKey",t[t.ItemChange=10]="ItemChange",t[t.NoteResource=11]="NoteResource",t[t.ResourceLocalState=12]="ResourceLocalState",t[t.Revision=13]="Revision",t[t.Migration=14]="Migration",t[t.SmartFilter=15]="SmartFilter",t[t.Command=16]="Command"}(e.ModelType||(e.ModelType={})),function(t){t.File="file",t.Edit="edit",t.View="view",t.Note="note",t.Tools="tools",t.Help="help",t.Context="context",t.NoteListContextMenu="noteListContextMenu",t.EditorContextMenu="editorContextMenu",t.FolderContextMenu="folderContextMenu",t.TagContextMenu="tagContextMenu"}(n=e.MenuItemLocation||(e.MenuItemLocation={})),e.isContextMenuItemLocation=function(t){return[n.Context,n.NoteListContextMenu,n.EditorContextMenu,n.FolderContextMenu,n.TagContextMenu].includes(t)},function(t){t.NoteToolbar="noteToolbar",t.EditorToolbar="editorToolbar"}(e.ToolbarButtonLocation||(e.ToolbarButtonLocation={})),function(t){t[t.Int=1]="Int",t[t.String=2]="String",t[t.Bool=3]="Bool",t[t.Array=4]="Array",t[t.Object=5]="Object",t[t.Button=6]="Button"}(e.SettingItemType||(e.SettingItemType={})),function(t){t.Desktop="desktop",t.Mobile="mobile",t.Cli="cli"}(e.AppType||(e.AppType={})),function(t){t[t.Database=1]="Database",t[t.File=2]="File"}(e.SettingStorage||(e.SettingStorage={})),function(t){t.MarkdownItPlugin="markdownItPlugin",t.CodeMirrorPlugin="codeMirrorPlugin"}(e.ContentScriptType||(e.ContentScriptType={}))}]);manifest.json000644 0000000761 14202726152010412 0ustar00000000 000000 { "manifest_version": 1, "id": "io.github.daeraxa.match-highlight", "app_min_version": "2.6", "version": "0.1.0", "name": "Highlight Matching", "description": "Marks words that match the highlighted selection", "author": "Daeraxa", "homepage_url": "https://discourse.joplinapp.org/t/highlight-matching-plugin/23747", "repository_url": "https://github.com/Daeraxa/joplin-plugin-match-highlight", "keywords": ["highlight","match-highlight","highlighting","duplicate","matching","match"] } matchhighlight.js000644 0000001063 14202726152011227 0ustar00000000 000000 function plugin(CodeMirror) {} module.exports = { default: function(_context) { return { plugin: plugin, codeMirrorResources: ['addon/search/match-highlighter'], codeMirrorOptions: { 'highlightSelectionMatches': { 'style': "matchhighlight", 'minChars': 2, 'delay': 100, 'wordsOnly': false, 'annotateScrollbar': false, 'showToken': false, 'trim': true}, }, assets: function() { return [{ name: './highlight.css' }]; } } }, }