Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebranding #42

Merged
merged 5 commits into from Jan 18, 2021
Merged
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -111,11 +111,26 @@ async function start() {
return {
requestHeaders,
};
}, { urls: [`${SERP_BASE_URL}/search*`]}, ["blocking", "requestHeaders"]);
}, { urls: [`${SERP_BASE_URL}/search*`, USE_STAGING ? 'https://staging.ghosterysearch.com/search*' : 'https://ghosterysearch.com/search*']}, ["blocking", "requestHeaders"]);
This conversation was marked as resolved by chrmod

This comment has been minimized.

@remusao

remusao Jan 18, 2021

Should this be:

Suggested change
}, { urls: [`${SERP_BASE_URL}/search*`, USE_STAGING ? 'https://staging.ghosterysearch.com/search*' : 'https://ghosterysearch.com/search*']}, ["blocking", "requestHeaders"]);
}, { urls: [`${SERP_BASE_URL}/search*`, USE_STAGING ? 'https://staging.glowstery.com/search*' : 'https://glowstery.com/search*']}, ["blocking", "requestHeaders"]);

This comment has been minimized.

@chrmod

chrmod Jan 18, 2021
Author Member

No, *.ghosterysearch.com is from now considered deprecated and will be removed in next release. This is just for transition period.


// TODO: this should only run in Ghostery Dawn
This conversation was marked as resolved by chrmod

This comment has been minimized.

@remusao

remusao Jan 18, 2021

Is there already a ticket for this?

This comment has been minimized.

@chrmod

chrmod Jan 18, 2021
Author Member

Nope.

browser.webRequest.onBeforeSendHeaders.addListener(async (details) => {
const { requestHeaders } = details;
requestHeaders.push({
name: "SERP-browser",
value: "Ghostery Dawn",
});
return {
requestHeaders,
};
}, { urls: [`${SERP_BASE_URL}/*`, USE_STAGING ? 'https://staging.ghosterysearch.com/search*' : 'https://ghosterysearch.com/search*']}, ["blocking", "requestHeaders"]);
}

browser.runtime.onMessage.addListener(async ({ action, args }, { tab }) => {
if (action === 'getTopSites') {
if (tab.incognito) {
return;
}
return (await browser.topSites.get({
newtab: true,
includeFavicon: true,
@@ -1,6 +1,6 @@
let DEBUG = false;
const STAGING_BASE_URL = 'https://staging.ghosterysearch.com';
const PROD_BASE_URL = 'https://ghosterysearch.com';
const STAGING_BASE_URL = 'https://staging.glowstery.com';
const PROD_BASE_URL = 'https://glowstery.com';
const STAGING_AUTH_DOMAIN = '.ghosterystage.com';
const PROD_AUTH_DOMAIN = '.ghostery.com';
let API_BASE_URL = DEBUG ? 'http://localhost:5000' : PROD_BASE_URL;
@@ -18,7 +18,7 @@ const setupEndpoints = (async function() {
if (!DEBUG) {
API_BASE_URL = STAGING_BASE_URL;
SERP_BASE_URL = STAGING_BASE_URL;
console.log(`USING_STAGING: Redirecting ghosterysearch.com to staging.ghosterysearch.com`)
console.log(`USING_STAGING: Redirecting glowstery.com to staging.glowstery.com`)
browser.webRequest.onBeforeRequest.addListener(async (details) => {
return {
redirectUrl: details.url.replace(PROD_BASE_URL, STAGING_BASE_URL),
BIN -98.9 KB src/favicon.ico
Binary file not shown.
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg">
<title>Group 14</title>
<defs>
<linearGradient x1="23.5811043%" y1="8.3346177%" x2="76.5028918%" y2="74.9893573%" id="linearGradient-1">
<stop stop-color="#67A73A" offset="0"/>
<stop stop-color="#00AEF0" offset="1"/>
</linearGradient>
</defs>
<g id="Group-14" transform="matrix(0.8917, 0, 0, 0.8917, 2.97937, 0.324494)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" style="">
<path d="M45.8142233,44.0969831 C43.5796993,39.0330849 43.1951743,34.7426116 43.134904,33.0567563 L43.134904,19.1857638 C43.134904,8.58938939 34.3752083,-8.17124146e-14 23.5702376,-8.17124146e-14 C12.7640615,-8.17124146e-14 4.00406448,8.58938939 4.00406448,19.1857638 L4.00406448,33.2572738 C3.92028867,35.0706765 3.48121902,39.2302857 1.33348436,44.0969831 C-1.55437045,50.6365702 0.835048395,49.8574162 2.97585196,49.3191848 C5.11605282,48.7833656 9.89579456,46.6832077 11.3892943,49.2706384 C12.8815887,51.8565614 14.1267746,54.1029614 17.6113061,52.6381277 C21.0961389,51.1748016 22.7382051,50.6866242 23.235737,50.6866242 L23.912272,50.6866242 C24.4095025,50.6866242 26.0521715,51.1748016 29.5364016,52.6381277 C33.0212344,54.1029614 34.2661189,51.8565614 35.7593173,49.2706384 C37.2519131,46.6832077 42.0313535,48.7833656 44.172157,49.3191848 C46.3126592,49.8574162 48.701174,50.6365702 45.8142233,44.0969831" id="Fill-3" fill="url(#linearGradient-1)"/>
<path d="M23.6008454,8.8313856 C28.8629698,8.8313856 33.1711418,13.108785 33.1711418,18.401682 C33.1711418,20.4942227 32.4941433,22.4329001 31.355555,24.0023056 L31.355555,24.0023056 L36.0022262,28.6797495 C36.6176794,29.26443 36.6176794,30.2491551 36.0022262,30.8338356 C35.7252723,31.1415621 35.2944551,31.2954254 34.9251832,31.2954254 C34.5559114,31.2954254 34.1558668,31.1415621 33.8481402,30.8338356 L33.8481402,30.8338356 L29.201469,26.1563917 C27.6320635,27.29498 25.6933861,27.9719784 23.6008454,27.9719784 C18.338721,27.9719784 14.0305489,23.6945791 14.0305489,18.401682 C14.0305489,13.1395576 18.338721,8.8313856 23.6008454,8.8313856 Z M23.5700727,11.939424 C20.0004445,11.939424 17.077042,14.8320538 17.077042,18.4324547 C17.077042,22.0020829 19.9696718,24.9254854 23.5700727,24.9254854 C27.1704736,24.9254854 30.093876,22.0020829 30.093876,18.401682 C30.093876,14.8320538 27.1397009,11.939424 23.5700727,11.939424 Z" id="Combined-Shape" stroke="#FFFFFF" stroke-width="0.5" fill="#FFFFFF" fill-rule="nonzero"/>
</g>
</svg>
@@ -1,5 +1,5 @@
{
"version": "0.1.22",
"version": "0.2.0",
"browser_specific_settings": {
"gecko": {
"id": "search@ghostery.com"
@@ -21,6 +21,8 @@
"matches": [
"https://*.ghosterysearch.com/",
"https://*.ghosterysearch.com/?*",
"https://*.glowstery.com/",
"https://*.glowstery.com/?*",
"http://localhost/",
"http://localhost/?*"
],
@@ -31,6 +33,7 @@
}, {
"matches": [
"https://*.ghosterysearch.com/*",
"https://*.glowstery.com/*",
"http://localhost/*"
],
"js": [
@@ -39,12 +42,13 @@
}, {
"matches": [
"https://*.ghosterysearch.com/search*",
"https://*.glowstery.com/search*",
"http://localhost/search*"
],
"js": ["content/additional-search-engines.js"]
}],
"manifest_version": 2,
"name": "Ghostery Search",
"name": "Ghostery Glow",
"permissions": [
"search",
"storage",
@@ -59,22 +63,25 @@
"https://consumerapi.ghosterystage.com/*",
"https://ghosterysearch.com/*",
"https://staging.ghosterysearch.com/*",
"https://glowstery.com/*",
"https://staging.glowstery.com/*",
"http://localhost/*"
],
"icons": {
"16": "favicon.ico"
"48": "icon.svg",
"96": "icon.svg"
},
"web_accessible_resources": [
"favicon.ico"
"icon.svg"
],
"chrome_settings_overrides" : {
"search_provider": {
"name": "Ghostery Search",
"search_url": "https://ghosterysearch.com/search?q={searchTerms}",
"name": "Ghostery Glow",
"search_url": "https://glowstery.com/search?q={searchTerms}",
"keyword": "@ghostery",
"favicon_url": "https://ghosterysearch.com/img/favicon-32x32.png",
"favicon_url": "https://glowstery.com/img/favicon-32x32.png",
"is_default": true,
"suggest_url": "https://ghosterysearch.com/suggest",
"suggest_url": "https://glowstery.com/suggest",
"suggest_url_get_params": "q={searchTerms}"
}
},
@@ -258,7 +258,7 @@ <h2>Pick a default search engine for all your searches.</h2>
</p>
<div class="buttons">
<button class="cancel-button">Cancel</button>
<button class="confirm-button" data-name="Ghostery Search">Confirm</button>
<button class="confirm-button" data-name="Ghostery Glow">Confirm</button>
</div>
</section>
</div>
@@ -27,7 +27,7 @@ async function selectSearchEngine(name) {
});
if (name === browser.runtime.getManifest()["chrome_settings_overrides"]["search_provider"].name) {
browser.tabs.update(currentTab.id, {
url: "https://ghosterysearch.com/account",
url: "https://glowstery.com/account",
});
} else {
await browser.tabs.create({});
ProTip! Use n and p to navigate between commits in a pull request.