Skip to content

Commit d8727ec

Browse files
committed
Remove type attribute
1 parent 50a3286 commit d8727ec

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

source/background.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ chrome.action.onClicked.addListener(async () => {
1414
// 'popup' and 'sidebar' are handled by the browser
1515

1616
if (position === 'tab') {
17-
chrome.tabs.create({url: chrome.runtime.getURL('index.html?type=tab')});
17+
chrome.tabs.create({url: chrome.runtime.getURL('index.html')});
1818
return;
1919
}
2020

@@ -24,7 +24,7 @@ chrome.action.onClicked.addListener(async () => {
2424
const currentWindow = await chrome.windows.getCurrent();
2525
await chrome.windows.create({
2626
type: 'popup',
27-
url: chrome.runtime.getURL('index.html?type=window'),
27+
url: chrome.runtime.getURL('index.html?auto-fit=true'),
2828
width,
2929
height,
3030
top: currentWindow.top + Math.round((currentWindow.height - height) / 2),
@@ -36,4 +36,4 @@ chrome.action.onClicked.addListener(async () => {
3636
matchOptions();
3737

3838
// DEVELOPMENT MODE: uncomment this so the tab will reopen on extension reload
39-
// chrome.tabs.create({url:'chrome-extension://aknaajkpkdhfnbdfopjlkpkmajdckgfk/index.html?type=tab'})
39+
// chrome.tabs.create({url:'chrome-extension://aknaajkpkdhfnbdfopjlkpkmajdckgfk/index.html'})

source/main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ new App({
55
target: document.body,
66
});
77

8-
const type = new URLSearchParams(location.search).get('type');
9-
document.documentElement.dataset.type = type;
10-
if (type === 'window') {
8+
const autoFit = new URLSearchParams(location.search).has('auto-fit');
9+
if (autoFit) {
1110
fitWindow();
1211
}
1312

source/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"action": {
1515
"default_icon": "logo.png",
16-
"default_popup": "index.html?type=popup"
16+
"default_popup": "index.html"
1717
},
1818
"side_panel": {
1919
"default_path": "index.html"

0 commit comments

Comments
 (0)