Explorar o código

refactor: drop unnecessary "content" suffix

tophf %!s(int64=3) %!d(string=hai) anos
pai
achega
0cb9160e72

+ 1 - 1
src/injected/content/bridge.js

@@ -1,5 +1,5 @@
 import { INJECT_PAGE, browser } from '../util';
-import { sendCmd } from './util-content';
+import { sendCmd } from './util';
 
 const allowed = createNullObj();
 const dataKeyNameMap = createNullObj();

+ 1 - 1
src/injected/content/cmd-run.js

@@ -1,5 +1,5 @@
 import bridge from './bridge';
-import { sendCmd } from './util-content';
+import { sendCmd } from './util';
 import { INJECT_CONTENT } from '../util';
 
 const { runningIds } = bridge;

+ 1 - 1
src/injected/content/index.js

@@ -5,7 +5,7 @@ import { injectPageSandbox, injectScripts } from './inject';
 import './notifications';
 import './requests';
 import './tabs';
-import { sendCmd } from './util-content';
+import { sendCmd } from './util';
 import { isEmpty, INJECT_CONTENT } from '../util';
 import { Run } from './cmd-run';
 

+ 1 - 1
src/injected/content/inject.js

@@ -1,5 +1,5 @@
 import bridge from './bridge';
-import { elemByTag, makeElem, onElement, sendCmd } from './util-content';
+import { elemByTag, makeElem, onElement, sendCmd } from './util';
 import {
   bindEvents, fireBridgeEvent,
   INJECT_CONTENT, INJECT_MAPPING, INJECT_PAGE,

+ 1 - 1
src/injected/content/notifications.js

@@ -1,5 +1,5 @@
 import bridge from './bridge';
-import { sendCmd } from './util-content';
+import { sendCmd } from './util';
 
 const notifications = createNullObj();
 

+ 1 - 1
src/injected/content/requests.js

@@ -1,5 +1,5 @@
 import bridge from './bridge';
-import { getFullUrl, makeElem, sendCmd } from './util-content';
+import { getFullUrl, makeElem, sendCmd } from './util';
 
 const {
   fetch: safeFetch,

+ 1 - 1
src/injected/content/tabs.js

@@ -1,5 +1,5 @@
 import bridge from './bridge';
-import { sendCmd } from './util-content';
+import { sendCmd } from './util';
 
 const tabIds = createNullObj();
 const tabKeys = createNullObj();

+ 0 - 0
src/injected/content/util-content.js → src/injected/content/util.js


+ 1 - 1
test/injected/gm-resource.test.js

@@ -1,6 +1,6 @@
 import test from 'tape';
 import { buffer2string } from '#/common';
-import { decodeResource } from '#/injected/content/util-content';
+import { decodeResource } from '#/injected/content/util';
 
 const stringAsBase64 = str => btoa(buffer2string(new TextEncoder().encode(str).buffer));