Skip to content

Commit

Permalink
fix: remove edit frame function: not working
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Mar 26, 2023
1 parent 4b5c19a commit fd65e8e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"128": "icons/128.png"
},
"permissions": [
"webNavigation",
"webRequest",
"webRequestBlocking",
"http://*/maps/embed*",
Expand Down
12 changes: 0 additions & 12 deletions replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,13 @@ const matcher = new RegExp(
`^(https?:\/\/)?(maps\.google\.(${gLocales.join('|')})\/maps\/?\?.*output=embed|(www\.)?google\.(${gLocales.join('|')})\/maps\/embed\/?\?)`
);

function editFrame(tabId, frameId) {
browser.webNavigation.getFrame({
tabId: tabId,
frameId: frameId
}).then(
(frameDetails) => {
console.log(frameDetails);
frameDetails.scrolling = 'no'; // trying to manipulate iframes attributes: not working
}
);
}

function redirect(req) {
if (req.url.match(matcher)) {
const params = new URLSearchParams(req.url.split('?')[1]);

console.log(req);
console.log(params);
//editFrame(req.tabId, req.frameId);

return {
redirectUrl: 'https://www.openstreetmap.org/export/embed.html?bbox=-12.041015625000002%2C44.32384807250689%2C27.465820312500004%2C57.397624055000456&layer=mapnik'
Expand Down

0 comments on commit fd65e8e

Please sign in to comment.