[tbb-commits] [tor-browser] 33/33: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
gitolite role
git at cupani.torproject.org
Tue May 3 22:40:41 UTC 2022
This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch tor-browser-91.9.0esr-11.5-1
in repository tor-browser.
commit dce69bdadefe0db9c3ac680df788e3ea95b8258b
Author: Richard Pospesel <richard at torproject.org>
AuthorDate: Tue May 3 22:24:19 2022 +0000
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
CreaBug 40860: te shortlist of unicode emoji for bridge-moji feature
---
.../torpreferences/content/connectionPane.js | 279 ++-------------------
1 file changed, 20 insertions(+), 259 deletions(-)
diff --git a/browser/components/torpreferences/content/connectionPane.js b/browser/components/torpreferences/content/connectionPane.js
index dfb8b00d81384..46fbbfecf832f 100644
--- a/browser/components/torpreferences/content/connectionPane.js
+++ b/browser/components/torpreferences/content/connectionPane.js
@@ -1079,272 +1079,33 @@ function makeBridgeId(bridgeString) {
// JS uses UTF-16. While most of these emojis are surrogate pairs, a few
// ones fit one UTF-16 character. So we could not use neither indices,
// nor substr, nor some function to split the string.
- const emojis = [
- "😄️",
- "😒️",
- "😉",
- "😭️",
- "😂️",
- "😎️",
- "🤩️",
- "😘",
- "😜️",
- "😏️",
- "😷",
- "🤢",
- "🤕",
- "🤧",
- "🥵",
- "🥶",
- "🥴",
- "😵️",
- "🤮️",
- "🤑",
- "🤔",
- "🫢",
- "🤐",
- "😮💨",
- "😐",
- "🤤",
- "😴",
- "🤯",
- "🤠",
- "🥳",
- "🥸",
- "🤓",
- "🧐",
- "😨",
- "😳",
- "🥺",
- "🤬",
- "😈",
- "👿",
- "💀",
- "💩",
- "🤡",
- "👺",
- "👻",
- "👽",
- "🦴",
- "🤖",
- "😸",
- "🙈",
- "🙉",
- "🙊",
- "💋",
- "💖",
- "💯",
- "💢",
- "💧",
- "💨",
- "💭",
- "💤",
- "👋",
- "👌",
- "✌",
- "👍",
- "👎",
- "🤛",
- "🙌",
- "💪",
- "🙏",
- "✍",
- "🧠",
- "👀",
- "👂",
- "👅",
- "🦷",
- "🐾",
- "🐶",
- "🦊",
- "🦝",
- "🐈",
- "🦁",
- "🐯",
- "🐴",
- "🦄",
- "🦓",
- "🐮",
- "🐷",
- "🐑",
- "🐪",
- "🐘",
- "🐭",
- "🐰",
- "🦔",
- "🦇",
- "🐻",
- "🐨",
- "🐼",
- "🐔",
- "🦨",
- "🦘",
- "🐦",
- "🐧",
- "🦩",
- "🦉",
- "🦜",
- "🪶",
- "🐸",
- "🐊",
- "🐢",
- "🦎",
- "🐍",
- "🦖",
- "🦀",
- "🐬",
- "🐙",
- "🐌",
- "🐝",
- "🐞",
- "🌸",
- "🌲",
- "🌵",
- "🍀",
- "🍁",
- "🍇",
- "🍉",
- "🍊",
- "🍋",
- "🍌",
- "🍍",
- "🍎",
- "🥥",
- "🍐",
- "🍒",
- "🍓",
- "🫐",
- "🥝",
- "🥔",
- "🥕",
- "🧅",
- "🌰",
- "🍄",
- "🍞",
- "🥞",
- "🧀",
- "🍖",
- "🍔",
- "🍟",
- "🍕",
- "🥚",
- "🍿",
- "🧂",
- "🍙",
- "🍦",
- "🍩",
- "🍪",
- "🎂",
- "🍬",
- "🍭",
- "🥛",
- "☕",
- "🫖",
- "🍾",
- "🍷",
- "🍹",
- "🍺",
- "🍴",
- "🥄",
- "🫙",
- "🧭",
- "🌋",
- "🪵",
- "🏡",
- "🏢",
- "🏰",
- "⛲",
- "⛺",
- "🎡",
- "🚂",
- "🚘",
- "🚜",
- "🚲",
- "🚔",
- "🚨",
- "⛽",
- "🚥",
- "🚧",
- "⚓",
- "⛵",
- "🛟",
- "🪂",
- "🚀",
- "⌛",
- "⏰",
- "🌂",
- "🌞",
- "🌙",
- "🌟",
- "⛅",
- "⚡",
- "🔥",
- "🌊",
- "🎃",
- "🎈",
- "🎉",
- "✨",
- "🎀",
- "🎁",
- "🏆",
- "🏅",
- "🔮",
- "🪄",
- "🎾",
- "🎳",
- "🎲",
- "🎭",
- "🎨",
- "🧵",
- "🎩",
- "📢",
- "🔔",
- "🎵",
- "🎤",
- "🎧",
- "🎷",
- "🎸",
- "🥁",
- "🔋",
- "🔌",
- "💻",
- "💾",
- "💿",
- "🎬",
- "📺",
- "📷",
- "🎮",
- "🧩",
- "🔍",
- "💡",
- "📖",
- "💰",
- "💼",
- "📈",
- "📌",
- "📎",
- "🔒",
- "🔑",
- "🔧",
- "🪛",
- "🔩",
- "🧲",
- "🔬",
- "🔭",
- "📡",
- "🚪",
- "🪑",
- "⛔",
- "🚩",
+const emojis = [
+ "👽","🤖","🧚","🧜","🏄","🐵","🦍","🐶","🐺","🦊","🐈","🦁","🐯","🐴","🦄","🦓",
+ "🦌","🐮","🐷","🐗","🐑","🦙","🦒","🐘","🐭","🐹","🐇","🐿","🦔","🐨","🐼","🦥",
+ "🦨","🦘","🐓","🐥","🐦","🐧","🕊","🦆","🦢","🦉","🦤","🦩","🦚","🦜","🐊","🐢",
+ "🦎","🐍","🐉","🦕","🦖","🐋","🐬","🐟","🐠","🐡","🦈","🐙","🐚","🐌","🦋","🐛",
+ "🐝","🐞","💐","🌸","🌹","🌺","🌻","🌼","🌷","🌱","🌲","🌳","🌴","🌵","🌿","🍁",
+ "🍇","🍉","🍊","🍋","🍌","🍍","🥭","🍏","🍐","🍑","🍒","🍓","🥝","🍅","🥥","🥑",
+ "🍆","🥕","🌽","🌶","🥬","🥦","🧅","🍄","🥜","🥐","🥖","🥨","🥞","🧇","🍔","🍕",
+ "🌭","🌮","🌯","🥚","🍿","🍙","🥟","🦀","🦞","🦑","🍦","🍩","🧁","🍬","🍭","🧃",
+ "🧉","🧭","⛰","🌋","🏝","🏡","⛲","⛺","🎠","🎡","💈","🚂","🚃","🚌","🚗","🚚",
+ "🚜","🛵","🛺","🚲","🛴","🛹","⚓️","⛵","🛶","🚤","🚢","✈️","🪂","🚁","🚠","🛰",
+ "🚀","🛸","⏳","🌙","🌡","☀️","🪐","⭐","☁️","🌧","🌩","🌀","🌈","☂️","❄️","☄️",
+ "🔥","💧","🌊","🎃","✨","🎈","🎉","🎊","🎏","🎟","🏆","⚽","🏀","🏈","🎾","🥏",
+ "🏓","⛸","🪀","🪁","🎱","🔮","🪄","🕹","🎲","🧩","🧸","🎨","🧵","🧶","🕶","🧦",
+ "🎒","👟","👠","👑","🎓","🧢","💍","💎","📢","🎵","🎙","🎤","🎧","📻","🎷","🪗",
+ "🎸","🎺","🎻","🪕","🥁","☎️","💿","🎥","🎬","📺","📷","🔍","💡","🔦","📖","📚",
+ "🏷","✏️","🖌","🖍","📎","📌","🔑","🪃","🏹","⚙️","🧲","🧪","🧬","🔭","📡","🗿",
];
+
// FNV-1a implementation that is compatible with other languages
const prime = 0x01000193;
const offset = 0x811c9dc5;
let hash = offset;
const encoder = new TextEncoder();
- for (const charCode of encoder.encode(bridgeString)) {
- hash = Math.imul(hash ^ charCode, prime);
+ for (const byte of encoder.encode(bridgeString)) {
+ hash = Math.imul(hash ^ byte, prime);
}
const hashBytes = [
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list