-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
137 lines (124 loc) · 5.88 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Emoji Censor tests</title>
<link href="https://fonts.googleapis.com/css?family=Noto+Sans&subset=devanagari" rel="stylesheet">
<style>
body {
font-family: 'Noto Sans', sans-serif;
}
iframe {
float: right;
height: 200px;
width: 50%;
}
.twitter-embeds {
border: 1px dashed;
max-width: 30em;
overflow: hidden;
padding: 0.5em;
}
.actions button {
background: #eee;
border: 1px solid;
border-radius: 2px;
font-size: 1.1em;
margin: 0 0.5em;
padding: 0.2em 0.5em;
}
#dynamic-content {
min-height: 10em;
}
</style>
</head>
<body>
<blockquote>
<p><em>These shouldn't be replaced at all.</em></p>
<p>
A Hebrew example, with niqqud: אֶת דַלְתִּי הֵזִיז הֵנִיעַ, קֶטֶב לִשְׁכַּתִּי יָשׁוֹד<br>
Normal writing (no niqqud): את דלתי הזיז הניע, קטב לשכתי ישוד
</p>
<p>
The reductio-ad-absurdum of this is Zalgo text, which works by ͖͟ͅr͞aṋ̫̠̖͈̗d͖̻̹óm̪͙͕̗̝ļ͇̰͓̳̫ý͓̥̟͍ ̕s̫t̫̱͕̗̰̼̘͜a̼̩͖͇̠͈̣͝c̙͍k̖̱̹͍͘i̢n̨̺̝͇͇̟͙ģ̫̮͎̻̟ͅ ̕n̼̺͈͞u̮͙m̺̭̟̗͞e̞͓̰̤͓̫r̵o̖ṷs҉̪͍̭̬̝̤ ̮͉̝̞̗̟͠d̴̟̜̱͕͚i͇̫̼̯̭̜͡ḁ͙̻̼c̲̲̹r̨̠̹̣̰̦i̱t̤̻̤͍͙̘̕i̵̜̭̤̱͎c̵s ͘o̱̲͈̙͖͇̲͢n͘ ̜͈e̬̲̠̩ac͕̺̠͉h̷̪ ̺̣͖̱ḻ̫̬̝̹ḙ̙̺͙̭͓̲t̞̞͇̲͉͍t̷͔̪͉̲̻̠͙e̦̻͈͉͇r͇̭̭̬͖,̖́ ̜͙͓̣̭s̘̘͈o̱̰̤̲ͅ ̛̬̜̙t̼̦͕̱̹͕̥h̳̲͈͝ͅa̦t̻̲ ̻̟̭̦̖t̛̰̩h̠͕̳̝̫͕e͈̤̘͖̞͘y҉̝͙ ̷͉͔̰̠o̞̰v͈͈̳̘͜er̶f̰͈͔ḻ͕̘̫̺̲o̲̭͙͠ͅw̱̳̺ ͜t̸h͇̭͕̳͍e̖̯̟̠ ͍̞̜͔̩̪͜ļ͎̪̲͚i̝̲̹̙̩̹n̨̦̩̖ḙ̼̲̼͢ͅ ̬͝s̼͚̘̞͝p͙̘̻a̙c҉͉̜̤͈̯̖i̥͡n̦̠̱͟g̸̗̻̦̭̮̟ͅ ̳̪̠͖̳̯̕a̫͜n͝d͡ ̣̦̙ͅc̪̗r̴͙̮̦̹̳e͇͚̞͔̹̫͟a̙̺̙ț͔͎̘̹ͅe̥̩͍ a͖̪̜̮͙̹n̢͉̝ ͇͉͓̦̼́a̳͖̪̤̱p̖͔͔̟͇͎͠p̱͍̺ę̲͎͈̰̲̤̫a̯͜r̨̮̫̣̘a̩̯͖n̹̦̰͎̣̞̞c̨̦̱͔͎͍͖e̬͓͘ ̤̰̩͙̤̬͙o̵̼̻̬̻͇̮̪f̴ ̡̙̭͓͖̪̤“̸͙̠̼c̳̗͜o͏̼͙͔̮r̞̫̺̞̥̬ru̺̻̯͉̭̻̯p̰̥͓̣̫̙̤͢t̳͍̳̖ͅi̶͈̝͙̼̙̹o̡͔n̙̺̹̖̩͝ͅ”̨̗͖͚̩.̯͓<br><br>
</p>
<p>
Devanagari: “ह” + “ि” = “हि” ; Korean: “ᄒ” + “ᅡ” + “ᆫ” = “한”
</p>
<cite>—<a href="http://reedbeta.com/blog/programmers-intro-to-unicode/">Nathan Reed</a></cite>
</blockquote>
<hr>
<p>
What about older things like ©™★♣︎ and ☯☭? Some "classic" emoji like 😀 and 😂😝 and 👏 and 🐱.<br>
How about skin tone modifiers? 👍👍🏻👍🏼👍🏽👍🏾👍🏿
</p>
<ul>
<li>Some more ZWJ sequences: 🇦+🇶 = 🇦🇶
<li>💑 is not, but 👩❤️👩 is ZWJ.
<li>Most definitely using ZWJ: 👨👨👧👧
</ul>
<hr>
<div class="twitter-embeds">
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">today we are open sourcing our emoji to share with everyone <a href="https://twitter.com/hashtag/twemojiparty?src=hash&ref_src=twsrc%5Etfw">#twemojiparty</a> 🎉 😜 👯 🍻 🎈 🎤 🎮 🚀 🌉 ✨ <a href="https://t.co/zkXqMXEkOT">https://t.co/zkXqMXEkOT</a></p>— Twitter Open Source (@TwitterOSS) <a href="https://twitter.com/TwitterOSS/status/530496382885720064?ref_src=twsrc%5Etfw">November 6, 2014</a></blockquote>
<a class="twitter-timeline" data-partner="tweetdeck" href="https://twitter.com/iamnotyourbroom/timelines/1078940061456986117?ref_src=twsrc%5Etfw">Emoji censor tests - Curated tweets by iamnotyourbroom</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
<hr>
<iframe src="test-iframe.html"></iframe>
<blockquote>
<h3>✂ Copy and 📋 Paste Emoji 👍 No apps required</h3>
<p>Emojis are supported on iOS, Android, macOS, Windows, and Linux. Copy and paste emojis to use on Twitter, Facebook, Slack, Instagram, Snapchat, Tumblr and more. Use Emoji Classic for older systems. ⤵️ Jump to:</p>
<p>😃💁 People • 🐻🌻 Animals • 🍔🍹 Food • 🎷⚽️ Activities • 🚘🌇 Travel • 💡🎉 Objects • 💖🔣 Symbols • 🎌🏳️🌈 Flags</p>
<cite>—<a href="http://getemoji.com/">getemoji.com</a></cite>
</blockquote>
<hr>
<div class="actions">
<button id="add-content">Add more content</button>
<button id="remove-content">Remove some content</button>
</div>
<div id="dynamic-content"></div>
<script src="src/emoji-censor.js"></script>
<script>
// setTimeout(function () {
// emojiCensor.redactElements('p, body > *');
// }, 500);
function rand(min, max) {
if (arguments.length < 2) {
max = min;
min = 0;
}
return Math.round(Math.random() * (max - min)) + min;
}
function randomEmoji() {
return String.fromCodePoint(rand(128000, 128253)); // 1F400–1F4FD, guaranteed to produce a valid character
}
function randomChar() {
return String.fromCharCode(rand(97, 122));
}
function randomWord() {
var charCount = rand(3, 16);
return Array(charCount).fill('').map(randomChar).join('');
}
function randomSentence() {
var wordCount = rand(10, 30);
return Array(wordCount).fill('').map(function () {
return rand(1) === 0 ? randomEmoji() : randomWord();
}).join(' ');
}
var container = document.getElementById('dynamic-content');
document.getElementById('add-content').addEventListener('click', function () {
var p = document.createElement('p');
p.className = 'sentence';
p.textContent = randomSentence();
container.appendChild(p);
});
document.getElementById('remove-content').addEventListener('click', function () {
var elems = container.querySelectorAll('.sentence');
if (elems.length) {
var remove = elems[rand(elems.length - 1)];
container.removeChild(remove);
}
});
</script>
</body>
</html>