-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItem-Information-Viewer.user.js
More file actions
598 lines (564 loc) · 23.8 KB
/
Item-Information-Viewer.user.js
File metadata and controls
598 lines (564 loc) · 23.8 KB
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
// ==UserScript==
// @author uniQ
// @name Steam Item Information Viewer
// @icon https://store.steampowered.com/favicon.ico
// @updateURL https://raw.githubusercontent.com/uniQIndividual/SteamUserscripts/master/Item-Information-Viewer.user.js
// @description Displays additional information provided by Steam's API and adds functionality to hidden items
// @include /^https:\/\/steamcommunity\.com\/(sharedfiles|workshop)\/filedetails\/\?((\d|\w)+=(\d|\w)*&)*id=\d{1,20}/
// @version 1.3.3
// ==/UserScript==
// idea from https://greasyfork.org/es/users/2611-alvaro but substantially changed
/*jshint esversion: 6 */
function getData() {
var id = new URL(location.href).searchParams.get("id");
$J.ajax({
method: "POST",
url: "https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v0001/",
data: "itemcount=1&publishedfileids[0]=" + id + "&format=json",
success: function(response) {
try {
let data = response.response.publishedfiledetails[0];
let fileurl = data.file_url;
let text = "These are the variables associated with this item.<br>Note that only values from the API are displayed.<br><br>";
for (var key in data) {
if (Object.prototype.toString.call(data[key]) === '[object Array]') {
text += '<b>' + sanitize(key) + '</b>: [';
for (let i = 0; i < data[key].length; i++) {
text += sanitize(JSON.stringify(data[key][i], null, 4));
}
text += ']';
} else {
switch (key) {
case 'creator':
text += '<b>' + sanitize(key) + '</b>: ' +
'<a href=\"https://steamcommunity.com/profiles/' + sanitizeURL(data[key]) + '/\">' + sanitize(data[key]) + '</a><br>';
break;
case 'file_size':
text += '<b>' + sanitize(key) + '</b>: ' +
sanitize(data[key]) + '<span class="bb_link_host">( ' + (sanitize(data[key]) / 1024 / 1024).toFixed(2) + ' MB )</span><br>';
break;
case 'creator_app_id':
case 'consumer_app_id':
text += '<b>' + sanitize(key) + '</b>: ' +
sanitize(data[key]) + '<span class="bb_link_host">( <a href=\"https://steamdb.info/app/' +
sanitize(data[key]) + '/\">' + appidLookup(sanitize(data[key])) + '</a> )</span><br>';
break;
case 'result':
text += '<b>' + sanitize(key) + '</b>: ' +
sanitize(data[key]) + '<span class="bb_link_host">( ' + resultLookup(sanitize(data[key])) + ' )</span><br>';
break;
case 'time_created':
case 'time_updated':
text += '<b>' + sanitize(key) + '</b>: ' +
sanitize(data[key]) + '<span class="bb_link_host">( ' + new Date(sanitize(data[key]) * 1000).toString() + ')</span><br>';
break;
case 'file_url':
case 'preview_url':
text += '<b>' + sanitize(key) + '</b>: ' +
(validURL(data[key]) ? '<a href=\"' + sanitizeURL(data[key]) + '\">' + sanitize(data[key]) + '</a>' : sanitize(data[key])) + '<br>';
break;
default:
text += '<b>' + sanitize(key) + '</b>: ' + sanitize(data[key]) + '<br>';
}
}
}
// add item options
text += '<br><br><br><div class=\"workshopItemControls\"><div class=\"workshopItemRatings\">';
text += '<span onclick=\"itemUpVote();\" id=\"itemUpVoteBtn\" class=\"general_btn voteUp\">' +
' </span><span onclick=\"itemDownVote();\" id=\"itemDownVoteBtn\" class=\"general_btn voteDown\"> </span>';
text += '<span onclick=\"itemFavorite();\" id=\"itemFavoriteBtn\" class=\"general_btn favorite tooltip \"><div class=\"favoriteText\">' +
'<div class=\"favoriteOption addfavorite selected\">Favorite</div></div></span>';
text += '<span onclick=\"itemReport();\" id=\"itemReportBtn\" class=\"general_btn report tooltip\"> </span>';
text += (data.creator ? '' : '<span onclick=\"itemLoadComments()\" class=\"general_btn share tooltip\" ' +
'id=\"ItemCommentBtn\">Load comments </span>');
text += '</div></div>';
// add comments
text += '<br>' +
'<div class=\"commentthread_entry\"><div class=\"commentthread_user_avatar playerAvatar offline\">' +
'</div><div class=\"commentthread_entry_quotebox\"><textarea rows=\"1\" class=\"commentthread_textarea\" id=\"commentthreadItemTextarea\"' +
' placeholder=\"Add a comment\" style=\"overflow: hidden; height: 40px;\"></textarea></div><div class=\"commentthread_entry_submitlink\" style=\"\">' +
'<a class=\"btn_grey_black btn_small_thin\" href=\"javascript:CCommentThread.FormattingHelpPopup( \'PublishedFile_Public\' );\">' +
' <span>Formatting help</span></a> <span class=\"btn_green_white_innerfade btn_small\" \"><span onclick=\"itemComment(\'' +
(data.creator ? sanitize(data.creator) : '') + '\', $(\'commentthreadItemTextarea\').value);\">Post Comment</span></span>' +
'</div><div class=\"commentthread_entry_error\" id=\"commentthread_entry_error\"></div></div>';
text += '<br>' +
'<div class=\"commentthread_comment_container\" style=\"max-width: ' +
window.screen.availWidth * 0.8 + 'px\" id=\"itemCommentSection\"></div><br><br>';
let storage = document.createElement('div');
storage.setAttribute('style', 'visibility: hidden;position: absolute;top: -9999px;');
storage.setAttribute('id', 'storage');
document.body.appendChild(storage);
$('storage').innerHTML = text;
let creatorID = document.createElement('div');
creatorID.setAttribute('style', 'visibility: hidden;position: absolute;top: -9999px;');
creatorID.setAttribute('id', 'creatorID');
document.body.appendChild(creatorID);
$('creatorID').innerHTML = data.creator ? sanitize(data.creator) : '';
if (data.creator) {
itemLoadComments(data.creator);
return;
}
// alternative methods of acquiring the creator id
// from a public comment section
if (document.getElementsByClassName('commentthread_area').length > 1) {
if (document.getElementsByClassName('commentthread_area')[0].id.includes('commentthread_PublishedFile')) {
$('creatorID').innerHTML = document.getElementsByClassName('commentthread_area')[1].id.match(/\d{17}/)[0];
itemLoadComments(data.creator);
return;
}
}
// from listed contributors
var listedAccounts = document.getElementsByClassName('friendBlock');
if (listedAccounts.length == 1) {
$('creatorID').innerHTML = 76561197960265728n + BigInt(listedAccounts[0].dataset.miniprofile);
itemLoadComments(data.creator);
return;
} else if (listedAccounts.length > 1 && document.getElementsByClassName('breadcrumbs')[0].children.length > 1) {
let ownerURL = document.getElementsByClassName('breadcrumbs')[0].children[2].href;
for (let i = 0; i < listedAccounts.length; i++) {
if (ownerURL.includes(listedAccounts[i].children[0].href)) {
$('creatorID').innerHTML = 76561197960265728n + BigInt(listedAccounts[i].dataset.miniprofile);
itemLoadComments(data.creator);
return;
}
}
}
// if everything else has failed
ShowAlertDialog("Output", text);
$('storage').innerHTML = '';
} catch (e) {
ShowAlertDialog("Error", "The request failed.<br>Please check the console log.");
console.log(e);
}
},
error: function(reponse) {
ShowAlertDialog("Error", "The request failed.<br>Please check the console log.");
console.log(reponse);
}
});
}
function itemLoadComments(userID) {
if (userID) {
let modalWindows = document.getElementsByClassName('newmodal_content');
if ($('storage').innerHTML == '' && modalWindows.length > 0) {
$('itemCommentSection').innerHTML = '';
$('storage').innerHTML = modalWindows[modalWindows.length - 1].children[0].innerHTML;
}
$J.post('https://steamcommunity.com/comment/PublishedFile_Public/render/' + userID + '/' + new URL(location.href).searchParams.get("id") + '/', {
'count': 50
}).done((result) => {
let text = $('storage').innerHTML;
if (result.success) {
result.comments_html = result.comments_html.replace(/href=\"javascript:CCommentThread/, '' +
'href=\"javascript:setTimeout(itemLoadComments(\'' + result.name.match(/\d{17}/)[0] +
'\'), 1500 );CCommentThread'); // ensure the overlay is refreshed on comment deletion
result.comments_html = result.comments_html == "" ? "<span class=\"bb_link_host\">(No comments were found)</span>" : result.comments_html;
} else {
result.comments_html = "<span class=\"bb_link_host\">(There was an error loading the comments)</span>";
}
text = text.slice(0, text.indexOf('id=\"itemCommentSection\">') + 24) + result.comments_html +
text.slice(text.indexOf('id=\"itemCommentSection\">') + 24);
if (document.getElementsByClassName('newmodal_content').length > 0) { //dismiss older overlays
document.getElementsByClassName('newmodal_background')[0].click();
}
ShowAlertDialog("Output", text);
$('storage').innerHTML = '';
}).fail((errorMsg) => {
let text = $('storage').innerHTML;
console.log("Could not retrive comments");
console.log(errorMsg);
if (document.getElementsByClassName('newmodal_content').length > 0) {
document.getElementsByClassName('newmodal_background')[0].click();
}
ShowAlertDialog("Output", text);
$('storage').innerHTML = '';
});
} else {
if ($('creatorID').innerHTML == '') {
ShowPromptDialog("Comments", "The script couldn't find the creator.<br>Please enter the Steam64ID of the item creator:",
"Load comments", "Cancel").done((input) => {
if (/^\d{17}$/.test(input)) {
$('creatorID').innerHTML = input;
itemLoadComments(input);
} else {
itemLoadComments();
}
});
} else {
itemLoadComments($('creatorID').innerHTML);
}
}
}
function itemReport() {
ShowPromptDialog("Report this item", "Please enter the reason", "Start", "Cancel", "").done((reason) => {
$J.post('https://steamcommunity.com/sharedfiles/reportitem', {
'id': new URL(location.href).searchParams.get("id"),
'description': reason,
'sessionid': g_sessionID
}).done((result) => {
ShowAlertDialog("Report sent", "");
$('itemReportBtn').addClassName('toggled');
}).fail((errorMsg) => {
console.log(errorMsg);
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
});
});
}
function itemUpVote() {
$J.post('https://steamcommunity.com/sharedfiles/voteup', {
'id': new URL(location.href).searchParams.get("id"),
'sessionid': g_sessionID
}).done((result) => {
if (result.items == undefined) {
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
} else {
$('itemUpVoteBtn').addClassName('toggled');
$('itemDownVoteBtn').removeClassName('toggled');
}
}).fail((errorMsg) => {
console.log(errorMsg);
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
});
}
function itemDownVote() {
$J.post('https://steamcommunity.com/sharedfiles/votedown', {
'id': new URL(location.href).searchParams.get("id"),
'sessionid': g_sessionID
}).done((result) => {
if (result.items == undefined) {
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
} else {
$('itemUpVoteBtn').removeClassName('toggled');
$('itemDownVoteBtn').addClassName('toggled');
}
}).fail((errorMsg) => {
console.log(errorMsg);
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
});
}
function itemFavorite() {
ShowConfirmDialog("Favorite", "Do you want to add or remove this item from your favorites?",
"Add to favorites", "Cancel", "Remove from favorites").done((choice) => {
if (choice == 'OK') {
$J.post('https://steamcommunity.com/sharedfiles/favorite', {
'id': new URL(location.href).searchParams.get("id"),
'appid': 0, // apparently this doesn't matter
'sessionid': g_sessionID
}).done((result) => {
if (result != '') { // how is this even a thing?
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
} else {
$('itemFavoriteBtn').addClassName('toggled');
}
}).fail((errorMsg) => {
console.log(errorMsg);
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
});
}
if (choice == 'SECONDARY') {
$J.post('https://steamcommunity.com/sharedfiles/unfavorite', {
'id': new URL(location.href).searchParams.get("id"),
'appid': 0,
'sessionid': g_sessionID
}).done((result) => {
if (result != '') {
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
} else {
$('itemFavoriteBtn').removeClassName('toggled');
}
}).fail((errorMsg) => {
console.log(errorMsg);
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
});
}
});
}
function itemComment(userID, comment) {
if (userID != undefined && userID != '') {
$J.post('https://steamcommunity.com/comment/PublishedFile_Public/post/' + userID + '/' + new URL(location.href).searchParams.get("id") + '/', {
'comment': comment,
'sessionid': g_sessionID
}).done((result) => {
if (result) {
if (result.success) {
itemLoadComments(userID);
return;
}
}
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
}).fail((errorMsg) => {
console.log(errorMsg);
ShowAlertDialog('Error', 'There was an error while sending your request.<br>Perhaps you are not logged in or do not have permission?');
});
} else {
if ($('creatorID').innerHTML == '') {
ShowPromptDialog("Comments", "The script couldn't find the creator.<br>Please enter the Steam64ID of the item creator:",
"Add comment", "Cancel").done((input) => {
if (/^\d{17}$/.test(input)) {
$('creatorID').innerHTML = input;
itemComment(input, comment);
} else {
itemComment('', comment);
}
});
} else {
itemComment($('creatorID').innerHTML, comment);
}
}
}
function initialize(id) {
if (/^https:\/\/steamcommunity\.com\/(sharedfiles|workshop)\/filedetails\/\?((\d|\w)+=(\d|\w)*&)*id=\d{1,20}/.test(location.href)) {
// check for missing Steam libraries
// not ideal, could be replaced by the actual content
let testCSSWorkshop = () => {
var sheets = document.styleSheets,
o = {};
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].href != null) {
if (sheets[i].href.includes('https://community.cloudflare.steamstatic.com/public/css/skin_1/workshop.css')) {
return true;
}
}
}
return false;
};
if (!testCSSWorkshop()) {
var cssWorkshop = document.createElement('link');
cssWorkshop.href = 'https://community.cloudflare.steamstatic.com/public/css/skin_1/workshop.css';
cssWorkshop.rel = "stylesheet";
cssWorkshop.type = "text/css";
document.head.appendChild(cssWorkshop);
}
let testCSSWorkshopItem = () => {
var sheets = document.styleSheets,
o = {};
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].href != null) {
if (sheets[i].href.includes('https://community.cloudflare.steamstatic.com/public/css/skin_1/workshop_itemdetails.css')) {
return true;
}
}
}
return false;
};
if (!testCSSWorkshopItem()) {
var cssWorkshopItem = document.createElement('link');
cssWorkshopItem.href = 'https://community.cloudflare.steamstatic.com/public/css/skin_1/workshop_itemdetails.css';
cssWorkshopItem.rel = "stylesheet";
cssWorkshopItem.type = "text/css";
document.head.appendChild(cssWorkshopItem);
}
var button = document.createElement('div');
button.setAttribute('style', ' width: 100%;');
button.innerHTML = '<a class=\"btn_darkblue_white_innerfade btn_border_2px btn_medium\" style=\" margin-top: 10px;\">' +
'<span class="subscribeText" style=\"padding-left: 15px;\">' +
'<div class="subscribeOption subscribe selected" id="getDataButton" onClick=\"getData()\">Display more information</div>' +
'</span></a>';
if ($('message')) { // hidden item
$('message').append(button);
} else if ($('ItemControls')) { // regular content
$('ItemControls').append(button);
}
} else {
console.error("Steam Item Information Viewer was executed on an invalid page and thus terminated > Only run on " +
"https://steamcommunity.com/(sharedfiles|workshop)/filedetails/?id=\\d{1,20}");
}
}
function validURL(str) { // from https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
return !!pattern.test(str);
}
function sanitize(string) { // very basic sanitizion in case Steam does not sanitize their output somewhere
// using https://stackoverflow.com/questions/2794137/sanitizing-user-input-before-adding-it-to-the-dom-in-javascript/48226843#48226843
string = string.toString();
const map = {
'<': '<',
'>': '>',
'"': '"',
"'": ''',
"/": '/',
"`": '`',
};
const reg = /[<>"'/`]/ig;
return string.replace(reg, (match) => (map[match]));
}
function sanitizeURL(string) {
string = string.toString();
const map = {
'<': '<',
'>': '>',
'"': '"',
"'": ''',
"`": '`',
};
const reg = /[<>"'`]/ig;
return string.replace(reg, (match) => (map[match]));
}
function appidLookup(string) {
string = string.toString();
const map = {
"7": 'Steam Client',
'440': 'Team Fortress 2',
"480": 'Spacewar',
'730': 'Counter-Strike: Global Offensive;',
'753': 'Steam',
"754": 'Steam Economy',
"760": 'Steam Screenshots',
"765": 'Greenlight',
"766": 'Steam Workshop',
"767": 'Steam Artwork',
"202351": 'Beta Access to the New Steam Community',
"248210": 'Game Library Sharing Access',
"223910": 'Saxxy Awards 2012',
"261310": '3rd Annual Saxxy Awards',
"321770": '4rd Annual Saxxy Awards',
"405270": '5rd Annual Saxxy Awards',
"551410": '6rd Annual Saxxy Awards',
"744350": 'Steam Chat Images',
"807210": '7rd Annual Saxxy Awards',
"1016370": 'Steam Forum Images',
'1070560': 'Steam Linux Runtime',
"1182480": 'TestApp',
};
return map[string] ? map[string] : 'Look up on SteamDB';
}
function resultLookup(string) { // taken from https://steamerrors.com/
string = string.toString();
const map = {
"1": 'OK',
"2": 'Fail',
"3": 'NoConnection',
"5": 'InvalidPassword',
"6": 'LoggedInElsewhere',
"7": 'InvalidProtocolVer',
"8": 'InvalidParam',
"9": 'FileNotFound (file type isn\'t supported)',
"10": 'Busy',
"11": 'InvalidState',
"12": 'InvalidName',
"13": 'InvalidEmail',
"14": 'DuplicateName',
"15": 'AccessDenied',
"16": 'Timeout',
"17": 'Banned',
"18": 'AccountNotFound',
"19": 'InvalidSteamID',
"20": 'ServiceUnavailable',
"21": 'NotLoggedOn',
"22": 'Pending',
"23": 'EncryptionFailure',
"24": 'InsufficientPrivilege',
"25": 'LimitExceeded',
"26": 'Revoked',
"27": 'Expired',
"28": 'AlreadyRedeemed',
"29": 'DuplicateRequest',
"30": 'AlreadyOwned',
"31": 'IPNotFound',
"32": 'PersistFailed',
"33": 'LockingFailed',
"34": 'LogonSessionReplaced',
"35": 'ConnectFailed',
"36": 'HandshakeFailed',
"37": 'IOFailure',
"38": 'RemoteDisconnect',
"39": 'ShoppingCartNotFound',
"40": 'Blocked',
"41": 'Ignored',
"42": 'NoMatch',
"43": 'AccountDisabled',
"44": 'ServiceReadOnly',
"45": 'AccountNotFeatured',
"46": 'AdministratorOK',
"47": 'ContentVersion',
"48": 'TryAnotherCM',
"49": 'PasswordRequiredToKickSession',
"50": 'AlreadyLoggedInElsewhere',
"51": 'Suspended',
"52": 'Cancelled',
"53": 'DataCorruption',
"54": 'DiskFull',
"55": 'RemoteCallFailed',
"56": 'PasswordUnset',
"57": 'ExternalAccountUnlinked',
"58": 'PSNTicketInvalid',
"59": 'ExternalAccountAlreadyLinked',
"60": 'RemoteFileConflict',
"61": 'IllegalPassword',
"62": 'SameAsPreviousValue',
"63": 'AccountLogonDenied',
"64": 'CannotUseOldPassword',
"65": 'InvalidLoginAuthCode',
"66": 'AccountLogonDeniedNoMail',
"67": 'HardwareNotCapableOfIPT',
"68": 'IPTInitError',
"69": 'ParentalControlRestricted',
"70": 'FacebookQueryError',
"71": 'ExpiredLoginAuthCode',
"72": 'IPLoginRestrictionFailed',
"73": 'AccountLockedDown',
"74": 'AccountLogonDeniedVerifiedEmailRequired',
"75": 'NoMatchingURL',
"76": 'BadResponse',
"77": 'RequirePasswordReEntry',
"78": 'ValueOutOfRange',
"79": 'UnexpectedError',
"80": 'Disabled',
"81": 'InvalidCEGSubmission',
"82": 'RestrictedDevice',
"83": 'RegionLocked',
"84": 'RateLimitExceeded',
"85": 'AccountLoginDeniedNeedTwoFactor',
"86": 'ItemDeleted',
"87": 'AccountLoginDeniedThrottle',
"88": 'TwoFactorCodeMismatch',
"89": 'TwoFactorActivationCodeMismatch',
"90": 'AccountAssociatedToMultiplePartners',
"91": 'NotModified',
"92": 'NoMobileDevice',
"93": 'TimeNotSynced',
"94": 'SmsCodeFailed',
"95": 'AccountLimitExceeded',
"96": 'AccountActivityLimitExceeded',
"97": 'PhoneActivityLimitExceeded',
"98": 'RefundToWallet',
"99": 'EmailSendFailure',
"100": 'NotSettled',
"101": 'NeedCaptcha',
"102": 'GSLTDenied',
"103": 'GSOwnerDenied',
"104": 'InvalidItemType',
"105": 'IPBanned',
"106": 'GSLTExpired',
"107": 'InsufficientFunds',
"108": 'TooManyPending',
"109": 'NoSiteLicensesFound',
"110": 'WGNetworkSendExceeded',
"111": 'AccountNotFriends',
"112": 'LimitedUserAccount',
"113": 'CantRemoveItem',
};
return map[string] ? map[string] : 'unknown';
}
(() => {
var script = document.createElement('script');
script.innerHTML = getData.toString() +
itemLoadComments.toString() +
itemReport.toString() +
itemUpVote.toString() +
itemDownVote.toString() +
itemFavorite.toString() +
itemComment.toString() +
validURL.toString() +
sanitize.toString() +
sanitizeURL.toString() +
appidLookup.toString() +
resultLookup.toString() +
"(" + initialize.toString() + ")()";
document.body.appendChild(script);
})();