-
Notifications
You must be signed in to change notification settings - Fork 4
/
jarTT.version.js
245 lines (215 loc) · 6.06 KB
/
jarTT.version.js
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
/*
* jarTT: A turntable.fm mod. Chris "inajar" Vickery <chrisinajar@gmail.com>
* javascript:(function(){$.getScript('https://raw.github.com/chrisinajar/jarTT/master/jarTT.js');})();
*
* Redistribution and use in source, minified, binary, or any other forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name, jarTT, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* No disclaimer, just don't be a dick.
*
*/
// storage, anything involving HTML5 storage or whatever else i mutate this into.
jarTT.version = {
load: function() {
jarTT.events.registerEvent("jarTT_unloaded", jarTT.version.unload);
var version = jarTT.storage.getNamedData('version');
if (!version)
version = 1.11;
var getWord = function(ar) {
return ar[Math.round(Math.random()*ar.length)];
}
var horribleColors = [
"pink",
"red",
"blue",
"#B8B8E0",
"magenta",
"gold",
"yellow"
];
var howAwesome = [
"love it.",
"shit bricks.",
"fuck some shit up.",
"die.",
"do cocain off a hooker just to feel again.",
"puke on your mom in excitement.",
"wonder if these superlatives are generated.",
"become mutually exclusive with unhappiness.",
"kill everyone you know.",
"devolve.",
"probably love it.",
"be pretty indifferent to it.",
"fall in love.",
"found a religion on it.",
"become a famous rapper.",
"win a grammy.",
"become a famous rapper"
];
var doWhat = [
"GET EXCITED!",
"FUCK YES!",
"SUCK ON DEEZ NUTS!",
"THE LEMONS!",
"OH NO YOU DI'NT!",
"PARENTS DON'T UNDERSTAND!",
"GIVE ME ALL YOUR MONEY!",
"KILL IT WITH FIRE!",
"SAIL!"
];
var changes = [];
var notes = "";
var showSettings = false;
var hasChanges = false;
switch(version) {
case 0.0: // first run
changes.push("Welcome to the glorious hole that is jarTT. Settings are in the Settings menu!");
changes.push("This is where the release notes go! Lists of changes are found here!");
changes.push("Better ui compatibility with Turntable Remix (shoutout to overra)");
changes.push("Rewrote hide audience support to use their animation system! Added support for opacity based animations, as well.");
changes.push("Mildly painful to view release notes!");
//version = 1.3;
// let fall through switch set it...
showSettings = true;
hasChanges = true;
case "1.4.0":
changes.push("Changed hivemind logic to take into account clock scew. Should fix insane values.");
version = "1.4.1";
hasChanges = true;
case "1.4.1":
changes.push("Fixed bug with version numbers super expanding and crashing the console.");
version = "1.4.2";
hasChanges = true;
case "1.4.2":
changes.push("Fixed smiff mode. Heck yeah!");
version = "1.5.0";
hasChanges = true;
showSettings = true;
case "1.5.0":
changes.push("Turntable Customs support (kind of)!");
changes.push("Gangnam Style. That is all.");
version = "1.6.0";
hasChanges = true;
showSettings = true;
case "1.6.0":
changes.push("\"I need to get back to the ship, I can't breath.\"");
version = "1.6.1";
hasChanges = true;
case "1.6.1":
changes.push("Better compatibility with Turntable Remix");
version = "1.6.2";
hasChanges = true;
case "1.6.2":
};
if (hasChanges) {
// jarTT.ui.showSettings();
var box = jarTT.ui.createBox();
var br = function() {
box.append("<br />");
};
box.append("<h1>jarTT!!! HI!!</h1><br />");
box.append($("<p>", {
html: "Version: " + version,
css: {
fontSize: 10,
marginTop: -20
}
}));
br();
box.append($("<p>", {
html: "Welcome! Unless you've already been using jarTT, in which case welcome <i>back</i>! We have some <b style='color: yellow;'>new</b> stuff for you, you're going to " + getWord(howAwesome) + ".<br />",
css: {
fontSize: 14,
}
}));
br();
// Changes
if (changes.length > 0) {
box.append($("<p>", {
text: "Check out this sweet new shit!",
css: {
fontSize: 22,
fontWeight: "bold",
marginBottom: 10
}
}));
var rape = function() {
var color,
self = $(this);
self.stop(true);
while ((color = getWord(horribleColors)) == self.data('lastColor') || (!color));
self.data('lastColor', color);
self.animate({color: color}, 2000, "linear", rape);
};
for (var i = 0, l = changes.length; i < l; ++i) (function(change) {
box.append($("<span>", {
text: change,
css: {
display: "block",
fontSize: 14,
fontWeight: "bold"
}
}).fadeIn(rape));
})(changes[i]);
br();
}
// Release notes
if (notes.length > 0) {
box.append("Release Notes! Look!");
br();
box.append($("<p>", {
text: notes,
css: {
fontSize: 14
}
}));
br();
}
if (showSettings) {
box.append($("<p>", {
text: "Some settings have changed!",
css: {
color: "red",
fontWeight: "bold",
padding: 10,
fontSize: 20
}
}));
box.append($("<button>", {
text: "Settings"
}).button().click(function() {
box.remove();
jarTT.ui.showSettings();
}));
br();
}
br();
box.append($("<p>", {
text: getWord(doWhat),
css: {
fontSize: 16,
color: "yellow",
fontWeight: "bold"
}
}));
br();
box.append($("<p>", {
text: "Thanks! -chrisinajar",
css: {
fontSize: 12
}
}));
}
jarTT.storage.setNamedData('version', version);
},
unload: function() {
},
};