SHOW:
|
|
- or go back to the newest paste.
1 | /* YOU CAN CHANGE THIS NUMBER TO CHANGE FILTER/MAP: | |
2 | 0 for "bassMap" | |
3 | 1 for "leetMap" | |
4 | 2 for "inappropriateMap" | |
5 | */ | |
6 | var MAP_IN_USE = 1; | |
7 | ||
8 | var mappingMapper = { | |
9 | 0: "bassMap", | |
10 | 1: "leetMap", | |
11 | 2: "inappropriateMap" | |
12 | }; | |
13 | var bassMap = { | |
14 | 'a': 'c', | |
15 | 'c': 'ballsack', | |
16 | 'e': 't', | |
17 | 'f': '6', | |
18 | 'o': '&' | |
19 | }; | |
20 | var leetMap = { | |
21 | 'a': '&', | |
22 | 't': '+', | |
23 | 'g': '6', | |
24 | 'e': '3', | |
25 | 'V': '\/', | |
26 | 'i': '1', | |
27 | "'": '`', | |
28 | 'c': '<' | |
29 | }; | |
30 | var inappropriateMap = { | |
31 | 'a': "ballsack", | |
32 | 'b': "ballsack", | |
33 | 'c': "ballsack", | |
34 | 'd': "DINGUS", | |
35 | 'e': "EXTRA", | |
36 | 'f': "FORCING", | |
37 | 'g': "ballsack", | |
38 | 'h': "HAIRY", | |
39 | 'i': "IN", | |
40 | 'o': "ON", | |
41 | 'p': "ballsack", | |
42 | 'v': "ballsack", | |
43 | 's': "ballsack" | |
44 | }; | |
45 | ||
46 | // Add in jQuery | |
47 | var jqEl = document.createElement("script"); | |
48 | jqEl.src = "http://code.jquery.com/jquery-1.11.1.min.js"; | |
49 | - | document.getElementByTagName("head")[0].appendChild(jqEl); |
49 | + | document.getElementsByTagName("head")[0].appendChild(jqEl); |
50 | ||
51 | // Remove JUNK and add textbox for typing | |
52 | $($("table")[0]).remove(); | |
53 | $($("table")[0]).remove(); | |
54 | $(".TRANSLATOR").remove(); | |
55 | $(".vbmenu_control").parent().parent().remove() | |
56 | $('iframe').remove(); | |
57 | $("object").parent().append( | |
58 | '<input type="textbox" class="TRANSLATOR" style="width:100%;padding:20px 10px;margin:10px;display:block" />' | |
59 | ); | |
60 | ||
61 | var switchHash = window[mappingMapper[MAP_IN_USE]]; | |
62 | ||
63 | $(".TRANSLATOR").off().on('keypress', function(e) { | |
64 | //console.log(e); | |
65 | e.preventDefault(); | |
66 | e.stopPropagation(); | |
67 | ||
68 | if( String.fromCharCode(e.which) in switchHash) { | |
69 | this.value += switchHash[String.fromCharCode(e.which)]; | |
70 | } else { | |
71 | this.value += String.fromCharCode(e.which); | |
72 | } | |
73 | }); | |
74 | ||
75 | ||
76 | // By Garo |