-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
44 lines (39 loc) · 1.68 KB
/
Copy pathmain.js
File metadata and controls
44 lines (39 loc) · 1.68 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
// ==UserScript==
// @name Seals with Ivi
// @namespace https://github.com/Merulast/ivi
// @updateURL https://raw.githubusercontent.com/Merulast/ivi/main/main.js
// @version 0.11
// @description Seal of Fantasy Extension
// @author Merula Fideley
// @match https://sealoffantasy.de/*
// @icon https://i.imgur.com/3OCGPeb.png
// @require https://raw.githubusercontent.com/Merulast/ivi/main/src/loaders.js?11
// @require https://raw.githubusercontent.com/Merulast/ivi/main/src/util.js?11
// @require https://raw.githubusercontent.com/Merulast/ivi/main/src/guestbook.js?11
// @require https://raw.githubusercontent.com/Merulast/ivi/main/src/wall.js?11
// @require https://raw.githubusercontent.com/Merulast/ivi/main/src/dialog.js?11
// @require https://raw.githubusercontent.com/Merulast/ivi/main/src/room.js?11
// @require https://raw.githubusercontent.com/Merulast/ivi/main/src/roomlist.js?11
// @grant none
// ==/UserScript==
const c = location.href.split('=').pop().split('#')[0];
let myNickname;
// initial settings
const _settings = {
colors: true,
gbsound: true,
preview: true,
img_extensions: ['jpg','gif','png','mp4','jpeg','webm'],
};
// Main
(function() {
console.log('Ivi!');
const page = location.href.replace('https://sealoffantasy.de', '').split('?')[0];
loadCache();
// switch mode
if(page==='/chat/room') initRoomPage(page);
else if(page==='/tools/wall') initWallPage(page);
else if(page.startsWith('/guestbook/view/')) initGbPage(page);
else if(page.startsWith('/guestbook/dialog/')) initDialogPage(page);
else if(page.startsWith('/chat/rooms')) initRoomListPage(page);
})();