Skip to content

Commit

Permalink
v8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
erosman authored Oct 2, 2023
1 parent f6566be commit cf9bd22
Show file tree
Hide file tree
Showing 18 changed files with 3,876 additions and 3,652 deletions.
163 changes: 86 additions & 77 deletions src/content/about.html
Original file line number Diff line number Diff line change
@@ -1,78 +1,87 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>About</title>
<link href="iframe.css" rel="stylesheet">
</head>
<body>

<nav>
<a href="#changelog">Changelog</a>
<a href="#credits">Credits</a>
</nav>

<article class="about">

<h2 id="changelog">Changelog</h2>
<dl>
<dt>8.1</dt>
<dd>Added Drag and Drop sorting of proxies (#29)</dd>
<dd>Fixed a pattern conversion issue (#28)</dd>



<dt>8.0</dt>
<dd>Added complete Light/Dark Theme</dd>
<dd>Added Exclude host feature</dd>
<dd>Added experimental Firefox on Android support (#21)</dd>
<dd>Added Get Location feature</dd>
<dd>Added Global Exclude</dd>
<dd>Added Host Pattern to proxy feature</dd>
<dd>Added Import FoxyProxy Account (Chrome)</dd>
<dd>Added Import From URL</dd>
<dd>Added Limit WebRTC feature</dd>
<dd>Added live Log (Firefox only)</dd>
<dd>Added Tab Proxy feature (Firefox only)</dd>
<dd>Changed <code>"browsingData"</code> to optional permissions</dd>
<dd>Dropped 'browser_style' in preparation for MV3</dd>
<dd>Increased minimum version to Firefox 93 (released 2021-10-05)</dd>
<dd>Unified code for Firefox, Chrome, and other Chromium-based browsers</dd>
<dd>Unified storage to share between Firefox & Chrome</dd>
<dd>Updated code & style for manifest v3 (MV3) compatibility</dd>
<dd>Updated Import Proxy List</dd>
<dd>Updated User Interface</dd>

</dl>

<h2 id="credits">Credits</h2>
<dl>

<dt>Translations</dt>
<dd><a href="https://github.com/foxyproxy/browser-extension" target="_blank">Github Public Repository</a></dd>
<dd>es: <a href="https://github.com/LuisAlfredo92" target="_blank">Luis Alfredo Figueroa Bracamontes</a></dd>
<dd>fa: <a href="https://github.com/axone13" target="_blank">Matin Kargar </a></dd>
<dd>fr: <a href="https://github.com/Hugo-C" target="_blank">Hugo-C</a></dd>
<dd>pl: Grzegorz Koryga</dd>
<dd>pt_BR: </dd>
<dd>ru: <a href="https://github.com/sosiska" target="_blank">Kirill Motkov</a></dd>
<dd>uk: <a href="https://github.com/sponsors/webknjaz" target="_blank">Sviatoslav Sydorenko</a></dd>
<dd>zh_CN: <a href="https://github.com/wsxy162" target="_blank">FeralMeow </a></dd>
<dd>zh_TW: <a href="https://github.com/samuikaze" target="_blank">samuikaze</a></dd>
</dl>

<p style="margin-top: 5em;">Please <a href="https://www.paypal.me/ericjung2/5.99" target="_blank">donate</a> or <a
href="https://getfoxyproxy.org/order/" target="_blank">buy dedicated VPN/Proxy Servers</a> in over 100 countries.<br>
<i>(including such remote places like <a href="https://wikipedia.org/wiki/Réunion" target="_blank">Reunion
Island</a>)</i></p>

<figure>
<img src="../image/ericjung.png" alt="">
<figcaption><a href="mailto:[email protected]">Eric H. Jung</a><br>Denver, Colorado, USA</figcaption>
</figure>

<p style="font: 1.5em cursive;">Thank you for using FoxyProxy!</p>
<img src="../image/logo.svg" style="width: 5em;" alt="">
</article>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>About</title>
<link href="iframe.css" rel="stylesheet">
</head>
<body>

<nav>
<a href="#changelog">Changelog</a>
<a href="#credits">Credits</a>
</nav>

<article class="about">

<h2 id="changelog">Changelog</h2>
<dl>
<dt>8.1</dt>
<dd>Added Drag and Drop sorting of proxies (#29)</dd>
<dd>Added Incognito/Container proxy (Firefox only) (experimental) (#33)</dd>
<dd>Added more data to the Log</dd>
<dd>Added port search to search filter</dd>
<dd>Added search filter to Toolbar popup (#23)</dd>
<dd>Fixed a pattern conversion issue (#28)</dd>
<dd>Increased Log display entries to 200</dd>




<dt>8.0</dt>
<dd>Added complete Light/Dark Theme</dd>
<dd>Added Exclude host feature</dd>
<dd>Added experimental Firefox on Android support (#21)</dd>
<dd>Added Get Location feature</dd>
<dd>Added Global Exclude</dd>
<dd>Added Host Pattern to proxy feature</dd>
<dd>Added Import FoxyProxy Account (Chrome)</dd>
<dd>Added Import From URL</dd>
<dd>Added Limit WebRTC feature</dd>
<dd>Added live Log (Firefox only)</dd>
<dd>Added Tab Proxy feature (Firefox only)</dd>
<dd>Changed <code>"browsingData"</code> to optional permissions</dd>
<dd>Dropped 'browser_style' in preparation for MV3</dd>
<dd>Increased minimum version to Firefox 93 (released 2021-10-05)</dd>
<dd>Unified code for Firefox, Chrome, and other Chromium-based browsers</dd>
<dd>Unified storage to share between Firefox & Chrome</dd>
<dd>Updated code & style for manifest v3 (MV3) compatibility</dd>
<dd>Updated Import Proxy List</dd>
<dd>Updated User Interface</dd>

</dl>

<h2 id="credits">Credits</h2>
<dl>
<dt>Icons</dt>
<dd>SVG: Mozilla</dd>
<dd>SVG: http://www.onlinewebfonts.com/icon</dd>

<dt>Translations</dt>
<dd><a href="https://github.com/foxyproxy/browser-extension" target="_blank">Github Public Repository</a></dd>
<dd>es: <a href="https://github.com/LuisAlfredo92" target="_blank">Luis Alfredo Figueroa Bracamontes</a></dd>
<dd>fa: <a href="https://github.com/axone13" target="_blank">Matin Kargar </a></dd>
<dd>fr: <a href="https://github.com/Hugo-C" target="_blank">Hugo-C</a></dd>
<dd>pl: Grzegorz Koryga</dd>
<dd>pt_BR: </dd>
<dd>ru: <a href="https://github.com/sosiska" target="_blank">Kirill Motkov</a></dd>
<dd>uk: <a href="https://github.com/sponsors/webknjaz" target="_blank">Sviatoslav Sydorenko</a></dd>
<dd>zh_CN: <a href="https://github.com/wsxy162" target="_blank">FeralMeow </a></dd>
<dd>zh_TW: <a href="https://github.com/samuikaze" target="_blank">samuikaze</a></dd>
</dl>

<p style="margin-top: 5em;">Please <a href="https://www.paypal.me/ericjung2/5.99" target="_blank">donate</a> or <a
href="https://getfoxyproxy.org/order/" target="_blank">buy dedicated VPN/Proxy Servers</a> in over 100 countries.<br>
<i>(including such remote places like <a href="https://wikipedia.org/wiki/Réunion" target="_blank">Reunion
Island</a>)</i></p>

<figure>
<img src="../image/ericjung.png" alt="">
<figcaption><a href="mailto:[email protected]">Eric H. Jung</a><br>Denver, Colorado, USA</figcaption>
</figure>

<p style="font: 1.5em cursive;">Thank you for using FoxyProxy!</p>
<img src="../image/logo.svg" style="width: 5em;" alt="">
</article>
</body>
</html>
145 changes: 73 additions & 72 deletions src/content/app.js
Original file line number Diff line number Diff line change
@@ -1,73 +1,74 @@
// ---------- Polyfill (Side Effect) -----------------------
// Promise based 'browser' namespace is used to avoid conflict between
// callback 'chrome' API in MV2 & promise 'chrome' API in MV3
// In case of callback 'chrome' API in MV3, 'chrome' namespace is used
// Firefox & Edge: browser namespace
// Chrome & Opera: chrome namespace
typeof globalThis.browser === 'undefined' && (globalThis.browser = globalThis.chrome);
// MV3 action API
!browser.action && (browser.action = browser.browserAction);

// ---------- Default Preference ---------------------------
export let pref = {
mode: 'disable',
sync: false,
proxyDNS: true,
globalExcludeWildcard: '',
globalExcludeRegex: '',
data: []
};
// ---------- /Default Preference --------------------------

// ---------- App ------------------------------------------
export class App {

static firefox = navigator.userAgent.includes('Firefox');
// static chrome = navigator.userAgent.includes('Chrome');

// ---------- User Preference ----------------------------
static getPref() {
// update pref with the saved version
return browser.storage.local.get().then(result => {
Object.keys(result).forEach(i => pref[i] = result[i]);
});
}

// ---------- Helper functions ---------------------------
// https://bugs.chromium.org/p/chromium/issues/detail?id=478654
// Add support for SVG images in Web Notifications API -> CH107
// https://bugs.chromium.org/p/chromium/issues/detail?id=1353252
// svg broken from bg service worker
static notify(message, title = browser.i18n.getMessage('extensionName'), id = '') {
browser.notifications.create(id, {
type: 'basic',
iconUrl: '/image/icon48.png',
title,
message
});
}

static equal(a, b) { // bg 2 options 1
return JSON.stringify(a) === JSON.stringify(b);
}

static getFlag(cc) {
cc = /^[A-Z]{2}$/i.test(cc) && cc.toUpperCase();
return cc ? String.fromCodePoint(...[...cc].map(i => i.charCodeAt() + 127397)) : '🌎';
}

static parseURL(url) {
try { url = new URL(url); }
catch (error) {
alert(`${url}${error.message}`);
return {};
}

// check protocol
if (!['http:', 'https:'].includes(url.protocol)) {
alert(`${url} ➜ Unsupported Protocol ${url.protocol}`);
return {};
}
return url;
}
// ---------- Polyfill (Side Effect) -----------------------
// Promise based 'browser' namespace is used to avoid conflict between
// callback 'chrome' API in MV2 & promise 'chrome' API in MV3
// In case of callback 'chrome' API in MV3, 'chrome' namespace is used
// Firefox & Edge: browser namespace
// Chrome & Opera: chrome namespace
typeof globalThis.browser === 'undefined' && (globalThis.browser = globalThis.chrome);
// MV3 action API
!browser.action && (browser.action = browser.browserAction);

// ---------- Default Preference ---------------------------
export let pref = {
mode: 'disable',
sync: false,
proxyDNS: true,
globalExcludeWildcard: '',
globalExcludeRegex: '',
data: [],
container: {}
};
// ---------- /Default Preference --------------------------

// ---------- App ------------------------------------------
export class App {

static firefox = navigator.userAgent.includes('Firefox');
// static chrome = navigator.userAgent.includes('Chrome');

// ---------- User Preference ----------------------------
static getPref() {
// update pref with the saved version
return browser.storage.local.get().then(result => {
Object.keys(result).forEach(i => pref[i] = result[i]);
});
}

// ---------- Helper functions ---------------------------
// https://bugs.chromium.org/p/chromium/issues/detail?id=478654
// Add support for SVG images in Web Notifications API -> CH107
// https://bugs.chromium.org/p/chromium/issues/detail?id=1353252
// svg broken from bg service worker
static notify(message, title = browser.i18n.getMessage('extensionName'), id = '') {
browser.notifications.create(id, {
type: 'basic',
iconUrl: '/image/icon48.png',
title,
message
});
}

static equal(a, b) { // bg 2 options 1
return JSON.stringify(a) === JSON.stringify(b);
}

static getFlag(cc) {
cc = /^[A-Z]{2}$/i.test(cc) && cc.toUpperCase();
return cc ? String.fromCodePoint(...[...cc].map(i => i.charCodeAt() + 127397)) : '🌎';
}

static parseURL(url) {
try { url = new URL(url); }
catch (error) {
alert(`${url}${error.message}`);
return {};
}

// check protocol
if (!['http:', 'https:'].includes(url.protocol)) {
alert(`${url} ➜ Unsupported Protocol ${url.protocol}`);
return {};
}
return url;
}
}
14 changes: 7 additions & 7 deletions src/content/background.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Background</title>
<script type="module" src="background.js"></script>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Background</title>
<script type="module" src="background.js"></script>
</head>
</html>
Loading

0 comments on commit cf9bd22

Please sign in to comment.