mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
fix: 🐛 Allow also cmd key for all ctrl actions on mac
This commit is contained in:
parent
eca15f23d3
commit
8be4a5e151
9 changed files with 62 additions and 58 deletions
|
|
@ -591,5 +591,10 @@ function link(URL, description) {
|
|||
return `<a href="${URL}" rel="noopener" target="_blank">${description}</a>`
|
||||
}
|
||||
|
||||
function isCtrlClick(event) {
|
||||
// meta key is cmd key on MacOs
|
||||
return event.ctrlKey || event.metaKey;
|
||||
}
|
||||
|
||||
// localStorageDB
|
||||
!function(){function e(t,o){return n?void(n.transaction("s").objectStore("s").get(t).onsuccess=function(e){var t=e.target.result&&e.target.result.v||null;o(t)}):void setTimeout(function(){e(t,o)},100)}var t=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;if(!t)return void console.error("indexDB not supported");var n,o={k:"",v:""},r=t.open("d2",1);r.onsuccess=function(e){n=this.result},r.onerror=function(e){console.error("indexedDB request error"),console.log(e)},r.onupgradeneeded=function(e){n=null;var t=e.target.result.createObjectStore("s",{keyPath:"k"});t.transaction.oncomplete=function(e){n=e.target.db}},window.ldb={get:e,set:function(e,t){o.k=e,o.v=t,n.transaction("s","readwrite").objectStore("s").put(o)}}}();
|
||||
Loading…
Add table
Add a link
Reference in a new issue