From 7b0f7398f7b26a51e84b3eb2f8e463c43615d108 Mon Sep 17 00:00:00 2001 From: JUD210_Hyuk Date: Wed, 19 Dec 2018 23:48:15 +0900 Subject: [PATCH 1/2] Add> DisplayKeys.js> Combination Key Mode --- main/js/DisplayKeys (Combination Key Mode).js | 230 ++++++++++++++++++ .../DisplayKeys (Default - ALL Key Mode).js | 201 +++++++++++++++ 2 files changed, 431 insertions(+) create mode 100644 main/js/DisplayKeys (Combination Key Mode).js create mode 100644 main/js/DisplayKeys (Default - ALL Key Mode).js diff --git a/main/js/DisplayKeys (Combination Key Mode).js b/main/js/DisplayKeys (Combination Key Mode).js new file mode 100644 index 0000000..fddaaad --- /dev/null +++ b/main/js/DisplayKeys (Combination Key Mode).js @@ -0,0 +1,230 @@ +function hasProperty(obj, prop) { + return (obj.hasOwnProperty(prop) && obj.prop !== ''); +} + +function getParameter(val) { + var regex = new RegExp('[\\?&#]' + val + '=([^&#]*)'); + var para = regex.exec(document.location.search); + + return para ? decodeURIComponent(para[1]) : null; +} + +// custom layout + +var isCombination = false; + +var layout_folder_name = ''; + +function getCustomLayout() { + layout_folder_name = getParameter('layout'); + + layout_folder_name = 'layout/' + (layout_folder_name === null || layout_folder_name === '' ? 'QWERTY+mouse' : decodeURIComponent(layout_folder_name)); + + if ($('#load_layout_script').length) + $('#load_layout_script').remove(); + + if (layout_folder_name.charAt(layout_folder_name.length - 1) !== '/') + layout_folder_name += '/'; + + var script = $('