14 lines
350 B
JavaScript
14 lines
350 B
JavaScript
function handle(requestDetails) {
|
|
let b64 = btoa(requestDetails.url)
|
|
// let original = atob(b64);
|
|
// console.log(`Loading: ${requestDetails.url} || ${b64}`);
|
|
|
|
return {
|
|
redirectUrl: `http://localhost:4433/s3/${b64}`
|
|
}
|
|
}
|
|
|
|
browser.webRequest.onBeforeRequest.addListener(
|
|
handle, { urls: ["<all_urls>"] }, ["blocking"]
|
|
);
|