From 7a74c3c31ece7788e82c46f22cb4327ffe08307a Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 13 Feb 2021 23:13:53 -0500 Subject: [PATCH] Move fg/js (#1384) * Move fg/js/frame-ancestry-handler.js to js/comm/frame-ancestry-handler.js * Move fg/js/frame-offset-forwarder.js to js/comm/frame-offset-forwarder.js * Move fg/js/dom-text-scanner.js to js/dom/dom-text-scanner.js * Move fg/js/text-source-element.js to js/dom/text-source-element.js * Move fg/js/text-source-range.js to js/dom/text-source-range.js * Move fg/js/float-main.js to js/display/popup-main.js * Move fg/js/content-script-main.js to js/app/content-script-main.js * Move fg/js/frontend.js to js/app/frontend.js * Move fg/js/popup-factory.js to js/app/popup-factory.js * Move fg/js/popup-proxy.js to js/app/popup-proxy.js * Move fg/js/popup-window.js to js/app/popup-window.js * Move fg/js/popup.js to js/app/popup.js --- dev/data/manifest-variants.json | 22 +++++++++---------- ext/{fg/js => js/app}/content-script-main.js | 0 ext/{fg/js => js/app}/frontend.js | 0 ext/{fg/js => js/app}/popup-factory.js | 0 ext/{fg/js => js/app}/popup-proxy.js | 0 ext/{fg/js => js/app}/popup-window.js | 0 ext/{fg/js => js/app}/popup.js | 0 .../js => js/comm}/frame-ancestry-handler.js | 0 .../js => js/comm}/frame-offset-forwarder.js | 0 ext/js/display/display.js | 14 ++++++------ .../display/popup-main.js} | 0 ext/{fg/js => js/dom}/dom-text-scanner.js | 0 ext/{fg/js => js/dom}/text-source-element.js | 0 ext/{fg/js => js/dom}/text-source-range.js | 0 ext/manifest.json | 22 +++++++++---------- ext/popup-preview.html | 16 +++++++------- ext/popup.html | 8 +++---- ext/search.html | 6 ++--- test/test-document-util.js | 6 ++--- test/test-dom-text-scanner.js | 2 +- 20 files changed, 48 insertions(+), 48 deletions(-) rename ext/{fg/js => js/app}/content-script-main.js (100%) rename ext/{fg/js => js/app}/frontend.js (100%) rename ext/{fg/js => js/app}/popup-factory.js (100%) rename ext/{fg/js => js/app}/popup-proxy.js (100%) rename ext/{fg/js => js/app}/popup-window.js (100%) rename ext/{fg/js => js/app}/popup.js (100%) rename ext/{fg/js => js/comm}/frame-ancestry-handler.js (100%) rename ext/{fg/js => js/comm}/frame-offset-forwarder.js (100%) rename ext/{fg/js/float-main.js => js/display/popup-main.js} (100%) rename ext/{fg/js => js/dom}/dom-text-scanner.js (100%) rename ext/{fg/js => js/dom}/text-source-element.js (100%) rename ext/{fg/js => js/dom}/text-source-range.js (100%) diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json index aa06bf58..72e07086 100644 --- a/dev/data/manifest-variants.json +++ b/dev/data/manifest-variants.json @@ -48,17 +48,17 @@ "js/language/text-scanner.js", "js/dom/document-util.js", "js/input/hotkey-handler.js", - "fg/js/dom-text-scanner.js", - "fg/js/popup.js", - "fg/js/text-source-range.js", - "fg/js/text-source-element.js", - "fg/js/popup-factory.js", - "fg/js/frame-ancestry-handler.js", - "fg/js/frame-offset-forwarder.js", - "fg/js/popup-proxy.js", - "fg/js/popup-window.js", - "fg/js/frontend.js", - "fg/js/content-script-main.js" + "js/dom/dom-text-scanner.js", + "js/app/popup.js", + "js/dom/text-source-range.js", + "js/dom/text-source-element.js", + "js/app/popup-factory.js", + "js/comm/frame-ancestry-handler.js", + "js/comm/frame-offset-forwarder.js", + "js/app/popup-proxy.js", + "js/app/popup-window.js", + "js/app/frontend.js", + "js/app/content-script-main.js" ], "match_about_blank": true, "all_frames": true diff --git a/ext/fg/js/content-script-main.js b/ext/js/app/content-script-main.js similarity index 100% rename from ext/fg/js/content-script-main.js rename to ext/js/app/content-script-main.js diff --git a/ext/fg/js/frontend.js b/ext/js/app/frontend.js similarity index 100% rename from ext/fg/js/frontend.js rename to ext/js/app/frontend.js diff --git a/ext/fg/js/popup-factory.js b/ext/js/app/popup-factory.js similarity index 100% rename from ext/fg/js/popup-factory.js rename to ext/js/app/popup-factory.js diff --git a/ext/fg/js/popup-proxy.js b/ext/js/app/popup-proxy.js similarity index 100% rename from ext/fg/js/popup-proxy.js rename to ext/js/app/popup-proxy.js diff --git a/ext/fg/js/popup-window.js b/ext/js/app/popup-window.js similarity index 100% rename from ext/fg/js/popup-window.js rename to ext/js/app/popup-window.js diff --git a/ext/fg/js/popup.js b/ext/js/app/popup.js similarity index 100% rename from ext/fg/js/popup.js rename to ext/js/app/popup.js diff --git a/ext/fg/js/frame-ancestry-handler.js b/ext/js/comm/frame-ancestry-handler.js similarity index 100% rename from ext/fg/js/frame-ancestry-handler.js rename to ext/js/comm/frame-ancestry-handler.js diff --git a/ext/fg/js/frame-offset-forwarder.js b/ext/js/comm/frame-offset-forwarder.js similarity index 100% rename from ext/fg/js/frame-offset-forwarder.js rename to ext/js/comm/frame-offset-forwarder.js diff --git a/ext/js/display/display.js b/ext/js/display/display.js index ffadd055..c522fe14 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -1573,13 +1573,13 @@ class Display extends EventDispatcher { await dynamicLoader.loadScripts([ '/js/language/text-scanner.js', '/js/comm/frame-client.js', - '/fg/js/popup.js', - '/fg/js/popup-proxy.js', - '/fg/js/popup-window.js', - '/fg/js/popup-factory.js', - '/fg/js/frame-ancestry-handler.js', - '/fg/js/frame-offset-forwarder.js', - '/fg/js/frontend.js' + '/js/app/popup.js', + '/js/app/popup-proxy.js', + '/js/app/popup-window.js', + '/js/app/popup-factory.js', + '/js/comm/frame-ancestry-handler.js', + '/js/comm/frame-offset-forwarder.js', + '/js/app/frontend.js' ]); const popupFactory = new PopupFactory(this._frameId); diff --git a/ext/fg/js/float-main.js b/ext/js/display/popup-main.js similarity index 100% rename from ext/fg/js/float-main.js rename to ext/js/display/popup-main.js diff --git a/ext/fg/js/dom-text-scanner.js b/ext/js/dom/dom-text-scanner.js similarity index 100% rename from ext/fg/js/dom-text-scanner.js rename to ext/js/dom/dom-text-scanner.js diff --git a/ext/fg/js/text-source-element.js b/ext/js/dom/text-source-element.js similarity index 100% rename from ext/fg/js/text-source-element.js rename to ext/js/dom/text-source-element.js diff --git a/ext/fg/js/text-source-range.js b/ext/js/dom/text-source-range.js similarity index 100% rename from ext/fg/js/text-source-range.js rename to ext/js/dom/text-source-range.js diff --git a/ext/manifest.json b/ext/manifest.json index 4ac53273..85aecc9c 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -47,17 +47,17 @@ "js/language/text-scanner.js", "js/dom/document-util.js", "js/input/hotkey-handler.js", - "fg/js/dom-text-scanner.js", - "fg/js/popup.js", - "fg/js/text-source-range.js", - "fg/js/text-source-element.js", - "fg/js/popup-factory.js", - "fg/js/frame-ancestry-handler.js", - "fg/js/frame-offset-forwarder.js", - "fg/js/popup-proxy.js", - "fg/js/popup-window.js", - "fg/js/frontend.js", - "fg/js/content-script-main.js" + "js/dom/dom-text-scanner.js", + "js/app/popup.js", + "js/dom/text-source-range.js", + "js/dom/text-source-element.js", + "js/app/popup-factory.js", + "js/comm/frame-ancestry-handler.js", + "js/comm/frame-offset-forwarder.js", + "js/app/popup-proxy.js", + "js/app/popup-window.js", + "js/app/frontend.js", + "js/app/content-script-main.js" ], "match_about_blank": true, "all_frames": true diff --git a/ext/popup-preview.html b/ext/popup-preview.html index 18aec551..6f6ff8b1 100644 --- a/ext/popup-preview.html +++ b/ext/popup-preview.html @@ -46,14 +46,14 @@ - - - - - - - - + + + + + + + + diff --git a/ext/popup.html b/ext/popup.html index 274340ca..e31237dd 100644 --- a/ext/popup.html +++ b/ext/popup.html @@ -96,9 +96,9 @@ - - - + + + @@ -126,7 +126,7 @@ - + diff --git a/ext/search.html b/ext/search.html index 384493c8..1efef61e 100644 --- a/ext/search.html +++ b/ext/search.html @@ -83,9 +83,9 @@ - - - + + + diff --git a/test/test-document-util.js b/test/test-document-util.js index 5c6a3894..52fabf97 100644 --- a/test/test-document-util.js +++ b/test/test-document-util.js @@ -94,9 +94,9 @@ async function testDocument1() { const vm = new VM({document, window, Range, Node}); vm.execute([ - 'fg/js/dom-text-scanner.js', - 'fg/js/text-source-range.js', - 'fg/js/text-source-element.js', + 'js/dom/dom-text-scanner.js', + 'js/dom/text-source-range.js', + 'js/dom/text-source-element.js', 'js/dom/document-util.js' ]); const [DOMTextScanner, TextSourceRange, TextSourceElement, DocumentUtil] = vm.get([ diff --git a/test/test-dom-text-scanner.js b/test/test-dom-text-scanner.js index 6fac695a..31eca1e7 100644 --- a/test/test-dom-text-scanner.js +++ b/test/test-dom-text-scanner.js @@ -166,7 +166,7 @@ async function testDocument1() { window.getComputedStyle = createAbsoluteGetComputedStyle(window); const vm = new VM({document, window, Range, Node}); - vm.execute('fg/js/dom-text-scanner.js'); + vm.execute('js/dom/dom-text-scanner.js'); const DOMTextScanner = vm.get('DOMTextScanner'); await testDomTextScanner(dom, {DOMTextScanner});