Skip to content

Commit 37c081c

Browse files
committed
New URL field autocompletes when removing a custom setting
1 parent 92d0af0 commit 37c081c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

popup.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ function removeCustom() {
100100
} else {
101101
document.querySelector('div#textShadowOptions').style.display = "none";
102102
}
103+
chrome.tabs.query({active: true, currentWindow: true}, async tabs => {
104+
var activeTab = tabs[0];
105+
var activeTabURL = new URL(activeTab.url);
106+
let urlField = document.querySelector("#add_url");
107+
urlField.value = activeTabURL.host;
108+
});
103109
updatePreview(); // Update preview
104110
browser.runtime.sendMessage({ // Send message to background script asking to update the action icon
105111
request: "update-action-icon"

0 commit comments

Comments
 (0)