Skip to content

Commit 55d7644

Browse files
committed
Fixed cookies not applying in iframes #319. Added translation support for some strings
1 parent b2d44f3 commit 55d7644

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/assets/javascripts/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ function copyCookie(frontend, targetUrl, urls, name) {
298298
url: url,
299299
name: name,
300300
value: value,
301+
secure: true,
301302
firstPartyDomain: firstPartyIsolate.value ? new URL(url).hostname : '',
302303
expirationDate: firstPartyIsolate.value ? null : expirationDate,
303304
},
@@ -333,6 +334,7 @@ function getCookiesFromStorage(frontend, urls, name) {
333334
url: url,
334335
name: cookie.name,
335336
value: cookie.value,
337+
secure: true,
336338
expirationDate: firstPartyIsolate.value ? null : cookie.expirationDate,
337339
firstPartyDomain: firstPartyIsolate.value ? new URL(url).hostname : '',
338340
})

src/pages/background/background.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,7 @@ async function redirectOfflineInstance(url, tabId) {
195195
let counter = 0;
196196

197197
function isAutoRedirect() {
198-
return new Promise(resolve => {
199-
browser.storage.local.get('autoRedirect',
200-
r => {
201-
if (r.autoRedirect == true) resolve(true)
202-
else resolve(false)
203-
}
204-
)
205-
})
198+
return new Promise(resolve => browser.storage.local.get('autoRedirect', r => resolve(r.autoRedirect == true)))
206199
}
207200

208201
browser.webRequest.onResponseStarted.addListener(
@@ -243,13 +236,13 @@ browser.contextMenus.create({
243236

244237
browser.contextMenus.create({
245238
id: "copyRaw",
246-
title: "Copy Raw",
239+
title: browser.i18n.getMessage("copyRaw"),
247240
contexts: ["browser_action"]
248241
});
249242

250243
browser.contextMenus.create({
251244
id: "unify",
252-
title: "Unify",
245+
title: browser.i18n.getMessage("unifySettings"),
253246
contexts: ["browser_action"]
254247
});
255248

0 commit comments

Comments
 (0)