diff --git a/edit.js b/edit.js index e0f87d5f..c44b41c8 100644 --- a/edit.js +++ b/edit.js @@ -162,6 +162,8 @@ function init() { section.domains = [params.domain]; } else if (params.url) { section.urls = [params.url]; + } else if (params["url-prefix"]) { + section.urlPrefixes = [params["url-prefix"]]; } addSection(section); // default to enabled diff --git a/popup.js b/popup.js index 6cd8598e..136f3588 100644 --- a/popup.js +++ b/popup.js @@ -25,13 +25,13 @@ chrome.tabs.getSelected(null, function(tab) { // For this URL var urlLink = writeStyleTemplate.cloneNode(true); - urlLink.href = "edit.html?url=" + encodeURIComponent(tab.url); + urlLink.href = "edit.html?url-prefix=" + encodeURIComponent(tab.url); urlLink.appendChild(document.createTextNode( // switchable; default="this URL" prefs.getPref("popup.breadcrumbs.usePath") ? t("writeStyleForURL").replace(/ /g, "\u00a0") : /\/\/[^/]+\/(.*)/.exec(tab.url)[1] )); - urlLink.title = "url(\"$\")".replace("$", tab.url); + urlLink.title = "url-prefix(\"$\")".replace("$", tab.url); writeStyleLinks.push(urlLink); document.querySelector("#write-style").appendChild(urlLink) if (prefs.getPref("popup.breadcrumbs")) { // switchable; default=enabled