-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb6fd86
commit e5315e5
Showing
7 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Potatoes Emojis Firefox WebExtension | ||
|
||
**This add-on replaces latest noto-emoji from Google with old "potatoes"(or "worms" or whatever you call it...) emojis from Android 6.0.1 on the Google website Messages for web.** | ||
|
||
## What it does | ||
|
||
This extension just includes: | ||
|
||
* a content script, "replace-emojis.js", that is injected into any pages under "messages.android.com" or any of its subdomains | ||
|
||
The content script intercept HTTP requests to the CDN hosting latest Noto emojis (ssl.gstatic.com) and redirect these requests to an archived version of the noto-emoji Github repository (commit 914c9ecb9d5e6d96c972c8df577cc6a36d162ece). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The icon "sleuth-or-spy_1f575" is taken from the Google Noto Emoji project, and is used under the terms of the Apache License 2.0: https://www.apache.org/licenses/LICENSE-2.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"description": "Replace latest noto-emoji from Google with old \"potatoes\"(or \"worms\" or whatever you call it...) emojis from Android 6.0.1 on the Google website Messages for web", | ||
"manifest_version": 2, | ||
"name": "Potatoes Emojis", | ||
"version": "1.0", | ||
|
||
"permissions": [ | ||
"webRequest", | ||
"webRequestBlocking", | ||
"*://messages.android.com/*", | ||
"*://ssl.gstatic.com/*" | ||
], | ||
|
||
"background": { | ||
"scripts": ["replace-emojis.js"] | ||
}, | ||
|
||
"icons": { | ||
"48": "icons/sleuth-or-spy_1f575_48.png", | ||
"96": "icons/sleuth-or-spy_1f575_96.png", | ||
"128": "icons/sleuth-or-spy_1f575_128.png" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var pattern = "*://ssl.gstatic.com/dynamite/emoji/*"; | ||
|
||
function redirect(requestDetails) { | ||
// Replace origin URL with archived Google Emoji equivalent from noto-emoji repository | ||
return { | ||
redirectUrl: requestDetails.url.replace("ssl.gstatic.com/dynamite/emoji", "raw.githubusercontent.com/googlei18n/noto-emoji/914c9ecb9d5e6d96c972c8df577cc6a36d162ece") | ||
}; | ||
} | ||
|
||
browser.webRequest.onBeforeRequest.addListener( | ||
redirect, | ||
{urls: [pattern], types:["image"]}, | ||
["blocking"] | ||
); |