├── LICENSE ├── README.md ├── amqAutoReady.user.js ├── amqAvoidTroubleShooterPopup.user.js ├── amqBugfix.user.js ├── amqChatCommands.user.js ├── amqEmojiAnswer.user.js ├── amqFriendOnlineNotifier.user.js ├── amqHighlightFriends.user.js ├── amqHotkeyFunctions.user.js ├── amqMousewheelVolumeControl.user.js ├── amqOneGroupGlow.user.js └── catboxVolume.user.js /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 nyamu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # amq_scripts 2 | 3 | im so lazy to write usage.... and english is too hard for me..../o\ 4 | 5 | ### [amqAutoReady.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqAutoReady.user.js) 6 | - It changes your state to ready automatically when you are in lobby. 7 | - Even when settings are changed. 8 | - You can unready by clicking unready button manually. 9 | - You can toggle it with [Alt+R]. Default is off. 10 | - Dedicated to lazists. 11 | 12 | ### [amqAvoidTroubleShooterPopup.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqAvoidTroubleShooterPopup.user.js) 13 | - it prevents trouble shooter popup. 14 | - **DON'T USE THIS SCRIPT UNLESS YOU KNOW WELL WHAT TO DO WHEN BUFFERING PROBLEM HAPPENED** 15 | - [amq official buffering troubleshooter here](https://animemusicquiz.com/troubleshooting), just in case 16 | 17 | ### [amqBugfix.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqBugfix.user.js) 18 | - it fixes bug that wrong game type on game settings 19 | 20 | ### [amqChatCommands.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqChatCommands.user.js) 21 | - it enables chat commands 22 | - commands for host in lobby 23 | - /t [oei] : change songtype 24 | - ex) /t oi => openings inserts. /t ei => endings inserts. /t e => endings only. 25 | - /n (number) : change number of songs 26 | - /d (number1)-(number2) : change difficulty 27 | - ex) /d 0-40 => change difficulty to 0-40 28 | - /random : change song selection to random 29 | - /watched : change song selection to watched only 30 | - /s (number) : change speed. amq allow one of 1, 1.5, 2, 4 only 31 | - /spec (someone) : send someone to spec 32 | - /kick (someone) : kick someone 33 | - /host (someone) : give someone host 34 | - commands for host in game 35 | - /lb : start a vote for returning to lobby 36 | - /pause : pause or unpause game 37 | - commands for everyone in lobby 38 | - /spec : change to spectator 39 | - /join : change to player 40 | - /queue : toggle queue when you are in lobby while game is progressing 41 | - commands for everyone in game 42 | - /v (number) : change volume 0-100 43 | - /skip : skip current song 44 | - /autothrow (answer) : start throwing with answer automatically. you can stop it by /autothrow without answer 45 | - **DON'T USE /autothrow COMMAND IN RANKED GAME. YOU MAY GET BANNED FROM GAME IF YOU TRY THIS** 46 | 47 | ### [amqEmojiAnswer.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqEmojiAnswer.user.js) 48 | - convert emoji shortcode in answer box when press enter 49 | - it works on room name also now 50 | 51 | ### ~~amqExpandLibraryAutoplay.user.js~~ 52 | - obsolete :runner: 53 | - ~~it plays automatically when you selected a song in expand library~~ 54 | - ~~the resolution you selected will be kept when you selected another song (but highest resolution if the resolution is not exist)~~ 55 | 56 | ### [amqFriendOnlineNotifier.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqFriendOnlineNotifier.user.js) 57 | - show notification when your friend is online 58 | 59 | ### [amqHighlightFriends.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqHighlightFriends.user.js) 60 | - apply color to yourself and friends in scorebox and avatarbox 61 | - apply color to name of yourself and friends on chat 62 | - apply color to join/spec/leave system message on chat 63 | - apply color to name of yourself and friends on spec list 64 | - color settings are available on settings>graphics tab 65 | - you can open player summary window by clicking this  icon or by pressing scroll lock key 66 | + it shows some infomation of all players, it shows friends only in ranked game 67 | + when you click someone, box will be changed to the person's box 68 | - codes that applying colors to friend name on chat and lobby was provided by ensorcell. thanks a lot 69 | - thanks a lot TheJoseph98 for providing window script and mentoring 70 | 71 | ### [amqHotkeyFunctions.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqHotkeyFunctions.user.js) 72 | - enables some hotkey functions. im so lazy to use mouse for this functions 73 | - [TAB] : move cursor focus to answer box and chat box 74 | - [ESC] : remove zombie tooltips 75 | - [PgUp] : increase volume 76 | - [PgDn] : decrease volume 77 | - [Ctrl + M] : toggle mute 78 | - [Shift + Enter] : skip 79 | - [Shift + Alt + S] : toggle autoskip 80 | - [Shift + PgUp] : move box focus to upper box 81 | - [Shift + PgDn] : move box focus to lower box 82 | - [Shift + Home] : move box focus to box 1 83 | - [Shift + End] : move box focus to my box 84 | - [Ctrl + Left] : join game in lobby. toggle ready if you joined 85 | - [Ctrl + Right] : change to spec in lobby if you joined 86 | - [Ctrl + Up] : start game if you are host and all players are ready 87 | - [Ctrl + Down] : start vote for returning lobby if game started and you are host 88 | 89 | ### ~~amqLadderAssist.user.js~~ 90 | - not supported :runner: 91 | - ~~This script is written to make IHI ladder game more comfortable.~~ 92 | - ~~You can open and close ladder info window by pressing [ALT+L].~~ 93 | - ~~Cloud button is for updating data manually. You can update by clicking it. It will receive match data from spreadsheet. Updating data takes a few seconds. just wait. It recieves data automatically when ladder window is opened first time only.~~ 94 | - ~~It shows your matches to play when match data is received.~~ 95 | - ~~Opponents of green rows are online, opponents of red rows are offline.~~ 96 | - ~~Tier is lower one of two.~~ 97 | - ~~R column button is for making room and changing settings. If you clicked it when you are outside of room, it makes room with match type and tier settings. If you clicked it when you are in a room and you are host, it changes settings.~~ 98 | - ~~I column button is for inviting opponent. You can invite opponent by clicking it. it works when you are in a room and opponent is online.~~ 99 | - ~~P column button is for copying opponent's discord id to clipboard. It is useful for pinging opponent.~~ 100 | - ~~W/L/D column buttons are for copying Win/Lose/Draw report command to clipboard. It is just for copying text. It doesn't report automatically.~~ 101 | - ~~Phone button on the left side of cloud button is for copying all opponent's discord id to clipboard. It is useful for pinging all opponents.~~ 102 | 103 | ### [amqMousewheelVolumeControl.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqMousewheelVolumeControl.user.js) 104 | - you can adjust volume with mouse wheel when mouse cursor is over video area or avatar area 105 | 106 | ### [amqOneGroupGlow.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/amqOneGroupGlow.user.js) 107 | - correct answer players glowing works even stadings box is only one box. 108 | 109 | ### [catboxVolume.user.js](https://github.com/nyamu-amq/amq_scripts/raw/master/catboxVolume.user.js) 110 | - you can adjust volume with mouse wheel when you opened some media on catbox 111 | 112 | ### ~~amqNoFriendRoomFilter.user.js~~ 113 | - friend room filter is official now. remove this script on your browser if you added it 114 | - literally [OBSOLETE](https://files.catbox.moe/hwb7zh.webm) 115 | 116 | --- 117 | im not good at javascript/html/css yet. so this scripts might have some bugs 118 | 119 | codes of Joseph and Klem and zol helped me to study javascript. thank you very much coding gods :place_of_worship: 120 | -------------------------------------------------------------------------------- /amqAutoReady.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name AMQ Auto Ready 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.9 5 | // @description 6 | // @author nyamu 7 | // @match https://*.animemusicquiz.com/* 8 | // @grant none 9 | // @require https://raw.githubusercontent.com/joske2865/AMQ-Scripts/master/common/amqScriptInfo.js 10 | 11 | // ==/UserScript== 12 | 13 | if (document.getElementById('startPage')) { 14 | return; 15 | } 16 | 17 | { 18 | let auto_ready=Cookies.get('auto_ready'); 19 | if(auto_ready!=undefined) { 20 | localStorage.setItem('auto_ready', auto_ready); 21 | Cookies.set('auto_ready', "", { expires: 0 }); 22 | } 23 | } 24 | 25 | var isAutoReady=localStorage.getItem('auto_ready')=="true"; 26 | var isAutoSpec=false; 27 | var isAutoStart=false; 28 | 29 | new Listener("Room Settings Changed", (changes) => { 30 | setTimeout(() => { checkReady(); },1); 31 | }).bindListener(); 32 | new Listener("Spectator Change To Player", (player) => { 33 | if (player.name === selfName) { 34 | setTimeout(() => { checkReady(); checkStart(); },1); 35 | } 36 | }).bindListener(); 37 | new Listener("Host Promotion", (payload) => { 38 | setTimeout(() => { checkReady(); },1); 39 | }).bindListener(); 40 | 41 | function checkReady() { 42 | if(!isAutoReady || !lobby.inLobby || lobby.isHost || lobby.isSpectator || lobby.isReady || quiz.gameMode === "Ranked") return; 43 | lobby.fireMainButtonEvent(); 44 | } 45 | 46 | function checkStart() { 47 | if(!isAutoStart || !lobby.inLobby || !lobby.isHost || quiz.gameMode === "Ranked") return; 48 | setTimeout(() => { 49 | if(!checkAllPlayersReady()) return; 50 | lobby.fireMainButtonEvent(); 51 | },1); 52 | } 53 | 54 | function checkAllPlayersReady() { 55 | for(var player of Object.values(lobby.players)) { 56 | if(!player.ready) return false; 57 | } 58 | return true; 59 | }; 60 | 61 | ViewChanger.prototype.changeView = (function() { 62 | var old=ViewChanger.prototype.changeView; 63 | return function() { 64 | old.apply(this,arguments); 65 | setTimeout(() => { onViewChanged(); },1); 66 | } 67 | })(); 68 | 69 | function onViewChanged() { 70 | if(viewChanger.currentView=="lobby") { 71 | if(isAutoSpec) { 72 | if(!lobby.isSpectator) lobby.changeToSpectator(selfName) 73 | } 74 | else { 75 | checkReady(); 76 | if(lobby.numberOfPlayers<2) checkStart(); 77 | } 78 | } 79 | isAutoSpec=false; 80 | } 81 | 82 | function dockeyup(event) { 83 | if(event.altKey && event.keyCode=='82') { 84 | if(event.shiftKey) { 85 | toggleAutoSpec(); 86 | } 87 | else { 88 | isAutoReady=!isAutoReady; 89 | localStorage.setItem('auto_ready', isAutoReady); 90 | chatSystemMessage(isAutoReady?"Enabled Auto Ready":"Disabled Auto Ready"); 91 | } 92 | } 93 | if(event.shiftKey && event.ctrlKey && event.keyCode=='83') { 94 | toggleAutoStart(); 95 | } 96 | } 97 | document.addEventListener('keyup', dockeyup, false); 98 | 99 | function toggleAutoSpec() { 100 | if(!quiz.inQuiz) return; 101 | isAutoSpec=!isAutoSpec; 102 | chatSystemMessage(isAutoSpec?"Enabled Auto Spec":"Disabled Auto Spec"); 103 | } 104 | 105 | function toggleAutoStart() { 106 | isAutoStart=!isAutoStart; 107 | chatSystemMessage(isAutoStart?"Enabled Auto Start":"Disabled Auto Start"); 108 | } 109 | 110 | function chatSystemMessage(msg) { 111 | if(!gameChat.isShown()) return; 112 | gameChat.systemMessage(msg); 113 | } 114 | 115 | new Listener("Join Game", (response) => { 116 | if(response.error) return; 117 | notifyAutoReady(); 118 | }).bindListener(); 119 | 120 | new Listener("Spectate Game", (response) => { 121 | if(response.error) return; 122 | notifyAutoReady(); 123 | }).bindListener(); 124 | 125 | function notifyAutoReady() { 126 | if(quiz.gameMode === "Ranked") return; 127 | gameChat.systemMessage(isAutoReady?"Auto Ready is Enabled. Press [ALT+R] to disable.":"Auto Ready is Disabled. Press [ALT+R] to enable."); 128 | gameChat.systemMessage(isAutoStart?"Auto Start is Enabled. Press [CTRL+SHIFT+S] to disable.":"Auto Start is Disabled. Press [CTRL+SHIFT+S] to enable."); 129 | } 130 | 131 | new Listener("Player Ready Change", (change) => { 132 | checkStart(); 133 | }).bindListener(); 134 | 135 | AMQ_addScriptData({ 136 | name: "Auto Ready", 137 | author: "nyamu", 138 | description: ` 139 |
It changes your state to ready automatically when you are in lobby. Even when settings are changed. You can unready by clicking unready button manually.
140 |You can toggle it with [ALT+R]. Default is off.
141 |Dedicated to lazists.
142 | ` 143 | }); 144 | -------------------------------------------------------------------------------- /amqAvoidTroubleShooterPopup.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name AMQ Avoid Trouble Shooter Popup 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.2 5 | // @description for video buffering experts 6 | // @author nyamu 7 | // @match https://*.animemusicquiz.com/* 8 | // @grant none 9 | 10 | // ==/UserScript== 11 | 12 | if (document.getElementById('startPage')) { 13 | return 14 | } 15 | 16 | troubleShooterDropDown.videoIssueBuffering = function() {} 17 | -------------------------------------------------------------------------------- /amqBugfix.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name AMQ Bugfix 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.2 5 | // @description Fix bug that wrong game type on game settings 6 | // @author nyamu 7 | // @match https://*.animemusicquiz.com/* 8 | // @grant none 9 | 10 | // ==/UserScript== 11 | 12 | if (document.getElementById('startPage')) { 13 | return 14 | } 15 | 16 | HostModal.prototype.changeSettings = function (changes) { 17 | if(changes['gameMode']!=undefined) 18 | this.gameMode=changes['gameMode']; 19 | Object.keys(changes).forEach(key => { 20 | setTimeout(() => { 21 | this.updateSetting(key, changes[key]); 22 | }, 1); 23 | }); 24 | }; 25 | -------------------------------------------------------------------------------- /amqChatCommands.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name AMQ Chat Commands 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.8 5 | // @description enable chat commands 6 | // @description - commands for host in lobby 7 | // @description -- /t [oei] : change songtype. ex) /t oi => openings inserts. /t ei => endings inserts. /t e => endings only. 8 | // @description -- /n (number) : change number of songs 9 | // @description -- /d (number1)-(number2) : change difficulty. ex) /d 0-40 => change difficulty to 0-40 10 | // @description -- /random : change song selection to random 11 | // @description -- /watched : change song selection to watched only 12 | // @description -- /s (number) : change speed. amq allows one of 1, 1.5, 2, 4 only 13 | // @description -- /spec (someone) : send someone to spec 14 | // @description -- /kick (someone) : kick someone 15 | // @description -- /host (someone) : give someone host 16 | // @description - commands for host in game 17 | // @description -- /lb : start a vote for returning to lobby 18 | // @description -- /pause : pause or unpause game 19 | // @description - commands for everyone in lobby 20 | // @description -- /spec : change to spectator 21 | // @description -- /join : change to player 22 | // @description -- /queue : toggle queue when you are in lobby while game is progressing 23 | // @description - commands for everyone in game 24 | // @description -- /v (number) : change volume 0-100 25 | // @description -- /skip : skip current song 26 | // @description -- /autothrow (answer) : start throwing with answer automatically. you can stop it by /autothrow without answer 27 | // @author nyamu 28 | // @match https://*.animemusicquiz.com/* 29 | // @grant none 30 | // @require https://raw.githubusercontent.com/joske2865/AMQ-Scripts/master/common/amqScriptInfo.js 31 | 32 | // ==/UserScript== 33 | 34 | // don't load on login page 35 | if (document.getElementById('startPage')) return; 36 | 37 | var autothrow = ''; 38 | new Listener("Game Chat Message", (payload) => { 39 | processChatCommand(payload); 40 | }).bindListener(); 41 | new Listener("game chat update", (payload) => { 42 | payload.messages.forEach(message => { 43 | processChatCommand(message); 44 | }); 45 | }).bindListener(); 46 | function processChatCommand(payload) { 47 | if (payload.sender !== selfName) return; 48 | if (payload.message.startsWith("/s ")) { 49 | if (!lobby.inLobby) return; 50 | if (!lobby.isHost) return; 51 | var settings = hostModal.getSettings(); 52 | settings.playbackSpeed.randomOn = false; 53 | settings.playbackSpeed.standardValue = payload.message.substr(3) * 1; 54 | changeGameSettings(settings); 55 | } 56 | if (payload.message.startsWith("/t ")) { 57 | if (!lobby.inLobby) return; 58 | if (!lobby.isHost) return; 59 | var types = payload.message.substr(3).toLowerCase(); 60 | var op = types.includes('o'); 61 | var ed = types.includes('e'); 62 | var ins = types.includes('i'); 63 | if (!op && !ed && !ins) return; 64 | var settings = hostModal.getSettings(); 65 | settings.songType.standardValue.openings = op; 66 | settings.songType.standardValue.endings = ed; 67 | settings.songType.standardValue.inserts = ins; 68 | settings.songType.advancedValue.openings = 0; 69 | settings.songType.advancedValue.endings = 0; 70 | settings.songType.advancedValue.inserts = 0; 71 | settings.songType.advancedValue.random = settings.numberOfSongs; 72 | changeGameSettings(settings); 73 | } 74 | if (payload.message.startsWith("/n ")) { 75 | if (!lobby.inLobby) return; 76 | if (!lobby.isHost) return; 77 | var numberOfSongs = payload.message.substr(3) * 1; 78 | if (numberOfSongs < 5) return; 79 | var settings = hostModal.getSettings(); 80 | settings.numberOfSongs = numberOfSongs; 81 | changeGameSettings(settings); 82 | } 83 | if (payload.message.startsWith("/d ")) { 84 | if (!lobby.inLobby) return; 85 | if (!lobby.isHost) return; 86 | var difs = payload.message.substr(3).split('-'); 87 | if (difs.length < 2) return; 88 | difs[0] = difs[0] * 1; 89 | difs[1] = difs[1] * 1; 90 | var settings = hostModal.getSettings(); 91 | settings.songDifficulity.advancedOn = true; 92 | if (difs[0] < difs[1]) 93 | settings.songDifficulity.advancedValue = [difs[0], difs[1]]; 94 | else 95 | settings.songDifficulity.advancedValue = [difs[1], difs[0]]; 96 | changeGameSettings(settings); 97 | } 98 | if (payload.message.startsWith("/random")) { 99 | if (!lobby.inLobby) return; 100 | if (!lobby.isHost) return; 101 | var settings = hostModal.getSettings(); 102 | settings.songSelection.standardValue = 1; 103 | settings.songSelection.advancedValue['watched'] = 0; 104 | settings.songSelection.advancedValue['unwatched'] = 0; 105 | settings.songSelection.advancedValue['random'] = settings.numberOfSongs; 106 | changeGameSettings(settings); 107 | } 108 | if (payload.message.startsWith("/watched")) { 109 | if (!lobby.inLobby) return; 110 | if (!lobby.isHost) return; 111 | var settings = hostModal.getSettings(); 112 | settings.songSelection.standardValue = 3; 113 | settings.songSelection.advancedValue['watched'] = settings.numberOfSongs; 114 | settings.songSelection.advancedValue['unwatched'] = 0; 115 | settings.songSelection.advancedValue['random'] = 0; 116 | changeGameSettings(settings); 117 | } 118 | else if (payload.message.startsWith("/v ")) { 119 | var volumetemp = payload.message.substr(3) * .01; 120 | volumetemp = Math.min(Math.max(volumetemp, 0), 100); 121 | volumeController.volume = volumetemp; 122 | volumeController.adjustVolume(); 123 | volumeController.setMuted(false); 124 | } 125 | else if (payload.message.startsWith("/spec")) { 126 | if (!lobby.inLobby) return; 127 | if (payload.message.length > 6) { 128 | if (!lobby.isHost) return; 129 | var target = payload.message.substr(6); 130 | if (!checkLobby(target)) return; 131 | lobby.changeToSpectator(target); 132 | } 133 | else { 134 | lobby.changeToSpectator(selfName); 135 | } 136 | } 137 | else if (payload.message.startsWith("/join")) { 138 | if (!lobby.inLobby) return; 139 | socket.sendCommand({ 140 | type: "lobby", 141 | command: "change to player", 142 | }); 143 | } 144 | else if (payload.message.startsWith("/queue")) { 145 | if (quiz.gameMode === 'Ranked') return; 146 | if (!quiz.inQuiz) return; 147 | if (!quiz.isSpectator) return; 148 | gameChat.joinLeaveQueue(); 149 | } 150 | else if (payload.message.startsWith("/kick ")) { 151 | if (!lobby.isHost) return; 152 | if (payload.message.length > 6) { 153 | var target = payload.message.substr(6); 154 | if (!checkLobby(target) && !checkSpec(target)) return; 155 | socket.sendCommand({ 156 | type: "lobby", 157 | command: "kick player", 158 | data: { playerName: target }, 159 | }); 160 | } 161 | } 162 | else if (payload.message.startsWith("/host ")) { 163 | if (!lobby.isHost) return; 164 | if (payload.message.length > 6) { 165 | var target = payload.message.substr(6); 166 | if (!checkLobby(target) && !checkSpec(target)) return; 167 | lobby.promoteHost(target); 168 | } 169 | } 170 | else if (payload.message.startsWith("/skip")) { 171 | if (!quiz.inQuiz) return; 172 | quiz.skipClicked(); 173 | } 174 | else if (payload.message.startsWith("/lb")) { 175 | if (!quiz.inQuiz) return; 176 | if (!quiz.isHost) return; 177 | quiz.startReturnLobbyVote(); 178 | } 179 | else if (payload.message.startsWith("/pause")) { 180 | if (!quiz.inQuiz) return; 181 | if (!quiz.isHost) return; 182 | if (quiz.pauseButton.pauseOn) { 183 | socket.sendCommand({ 184 | type: "quiz", 185 | command: "quiz unpause", 186 | }); 187 | } else { 188 | socket.sendCommand({ 189 | type: "quiz", 190 | command: "quiz pause", 191 | }); 192 | } 193 | } 194 | else if (payload.message.startsWith("/inv ")) { 195 | if (quiz.gameMode === 'Ranked') return; 196 | if (!quiz.inQuiz && !lobby.inLobby) return; 197 | if (payload.message.length > 5) { 198 | socket.sendCommand({ 199 | type: "social", 200 | command: "invite to game", 201 | data: { 202 | target: payload.message.substr(5) 203 | } 204 | }); 205 | } 206 | } 207 | else if (payload.message.startsWith("/autothrow")) { 208 | var index = payload.message.indexOf(' '); 209 | if (index > 0) autothrow = translateShortcodeToUnicode(payload.message.substr(index + 1)).text; 210 | else autothrow = ''; 211 | } 212 | else if (payload.message.startsWith("/prof ")) { 213 | var index = payload.message.indexOf(' '); 214 | if (index > 0) { 215 | var username = payload.message.substr(index + 1); 216 | if (username.length > 0) { 217 | playerProfileController.loadProfileIfClosed(payload.message.substr(index + 1), $("#gameChatContainer"), {}, () => { }, false, true); 218 | } 219 | } 220 | } 221 | } 222 | 223 | let playNextSongListener = new Listener("play next song", payload => { 224 | if (quiz.isSpectator) return; 225 | if (quiz.gameMode === 'Ranked') return; 226 | setTimeout(function () { 227 | if (autothrow.length > 0) { 228 | quiz.skipClicked(); 229 | $("#qpAnswerInput").val(autothrow); 230 | quiz.answerInput.submitAnswer(true); 231 | } 232 | }, 500); 233 | }).bindListener(); 234 | 235 | 236 | function checkLobby(target) { 237 | if (!lobby.getPlayerByName(target)) return false; 238 | return true; 239 | } 240 | function checkSpec(target) { 241 | for (var user of gameChat.spectators) { 242 | if (user.name === target) return true; 243 | } 244 | return false; 245 | } 246 | 247 | function changeGameSettings(settings) { 248 | if (!settings) return; 249 | if (lobby.soloMode) { 250 | settings.roomSize = 1; 251 | } 252 | var settingChanges = {}; 253 | Object.keys(settings).forEach((key) => { 254 | if (JSON.stringify(lobby.settings[key]) !== JSON.stringify(settings[key])) { 255 | settingChanges[key] = settings[key]; 256 | } 257 | }); 258 | if (Object.keys(settingChanges).length > 0) { 259 | hostModal.changeSettings(settingChanges); 260 | setTimeout(function () { lobby.changeGameSettings() }, 1); 261 | } 262 | } 263 | 264 | function AdjustVolume(amount) { 265 | var volumetemp = Cookies.get('volume') * 1; 266 | volumetemp = volumetemp + amount; 267 | volumetemp = Math.min(Math.max(volumetemp, 0), 1); 268 | volumeController.volume = volumetemp; 269 | volumeController.adjustVolume(); 270 | volumeController.setMuted(false); 271 | } 272 | 273 | AMQ_addScriptData({ 274 | name: "AMQ Chat Commands", 275 | author: "nyamu", 276 | description: `It converts emoji shortcodes in answer box when press enter.
37 |type like this in answer box
38 |
It changes to emoji when you press enter like this
40 |
Enjoy throwing.
42 | ` 43 | }); 44 | -------------------------------------------------------------------------------- /amqFriendOnlineNotifier.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name AMQ Friend Online Notifier 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.4 5 | // @description show notification when your friend is online 6 | // @author nyamu 7 | // @match https://*.animemusicquiz.com/* 8 | // @grant none 9 | // @require https://raw.githubusercontent.com/joske2865/AMQ-Scripts/master/common/amqScriptInfo.js 10 | 11 | // ==/UserScript== 12 | 13 | if (document.getElementById('startPage')) { 14 | return 15 | } 16 | 17 | let commandListener = new Listener("friend state change", (friend) => { 18 | if (friend.online) { 19 | popoutMessages.displayStandardMessage("",friend.name+" is online"); 20 | } 21 | }); 22 | commandListener.bindListener(); 23 | 24 | AMQ_addScriptData({ 25 | name: "Friend Online Notifier", 26 | author: "nyamu", 27 | description: ` 28 |It shows notification when your friend is online.
29 |Enjoy stalking.
Change color of yourself and friends' text in score box and avatar box and chat.
941 |It makes it easier to find your friends in room that many users joined like ranked game.
942 |You can adjust these colors and toggle on Settings > Graphics tab.
943 |You can open/close Player Summary window by clicking this button.
945 |It's almost like scorebox but shows some additional infomation. When you clicked someone, it shows his/her box.
947 |It shows your friends only in ranked game. It might be more useful in ranked game than normal room.
949 |Codes that applying colors to friend name on chat and lobby was provided by ensorcell. thanks a lot.
951 |Thanks a lot TheJoseph98 for providing window script and mentoring.
952 | ` 953 | }); 954 | 955 | AMQ_addStyle(` 956 | #playerSummaryWindowTableContainer { 957 | padding: 10px; 958 | } 959 | .friendScore { 960 | height: 30px; 961 | } 962 | .friendScore > td { 963 | vertical-align: middle; 964 | border: 1px solid black; 965 | text-align: center; 966 | } 967 | .fstRank { 968 | min-width: 40px; 969 | } 970 | .fstScore { 971 | min-width: 40px; 972 | } 973 | .fstName { 974 | min-width: 80px; 975 | } 976 | .fstBox { 977 | min-width: 40px; 978 | } 979 | .fstAnswer { 980 | min-width: 80px; 981 | } 982 | .correctGuess { 983 | background-color: rgba(0, 200, 0, 0.07); 984 | } 985 | .incorrectGuess { 986 | background-color: rgba(255, 0, 0, 0.07); 987 | } 988 | #qpPlayerSummaryButton { 989 | width: 30px; 990 | height: 100%; 991 | margin-right: 5px; 992 | } 993 | `); 994 | -------------------------------------------------------------------------------- /amqHotkeyFunctions.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name AMQ Hotkey Functions 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.20 5 | // @description enable hotkey functions 6 | // @description ESC: remove zombie tooltips 7 | // @description TAB: move cursor focus to chat box and answer box 8 | // @description PgUp: increase volume 9 | // @description PgDn: decrease volume 10 | // @description Ctrl + M : toggle mute 11 | // @description Shift + Enter: skip 12 | // @description Shift + Alt + S: toggle autoskip 13 | // @description Shift + PgUp: move box focus to upper box 14 | // @description Shift + PgDn: move box focus to lower box 15 | // @description Shift + Home: move box focus to box 1 16 | // @description Shift + End: move box focus to my box 17 | // @description Ctrl + Left: join game in lobby. toggle ready if you joined 18 | // @description Ctrl + Right: change to spec in lobby if you joined 19 | // @description Ctrl + Up: start game if you are host and all players are ready 20 | // @description Ctrl + Down: start vote for returning lobby if game started and you are host 21 | // @description Alt + 1: show song history window 22 | // @description Alt + 2: show song history info window 23 | // @author nyamu 24 | // @match https://*.animemusicquiz.com/* 25 | // @grant none 26 | // @require https://raw.githubusercontent.com/joske2865/AMQ-Scripts/master/common/amqScriptInfo.js 27 | 28 | // ==/UserScript== 29 | 30 | if (document.getElementById('startPage')) { 31 | return 32 | } 33 | 34 | function doc_keyUp(event) { 35 | if(event.keyCode=='27') { 36 | $("[id^=tooltip]").remove(); $("[id^=popover]").remove(); 37 | } 38 | else if(event.keyCode=='13' && !quiz.isSpectator && event.shiftKey) { 39 | quiz.skipClicked() 40 | } 41 | else if(event.keyCode=='77' && event.ctrlKey) { 42 | volumeController.setMuted(!volumeController.muted); 43 | volumeController.adjustVolume(); 44 | } 45 | else if(event.keyCode=='83' && event.shiftKey && event.altKey) { 46 | isAutoSkip=!isAutoSkip; 47 | chatSystemMessage(isAutoSkip?"Enabled Auto Skip":"Disabled Auto Skip"); 48 | } 49 | else if(event.keyCode=='9' && !event.altKey) { 50 | if(quiz.answerInput.inFocus || quiz.isSpectator) { 51 | quiz.setInputInFocus(false); 52 | $("#gcInput").focus(); 53 | } 54 | else { 55 | $("#gcInput").blur(); 56 | quiz.setInputInFocus(true); 57 | $("#qpAnswerInput").focus(); 58 | } 59 | } 60 | else if(lobby.inLobby && event.ctrlKey && hostModal.gameMode !== 'Ranked') { 61 | if(event.keyCode=='37') { 62 | if(lobby.isSpectator) { 63 | let changeToListner = new Listener("Change To Player", function (succes) { 64 | if (!succes) { 65 | displayMessage("Error changing to player"); 66 | } 67 | changeToListner.unbindListener(); 68 | }.bind(lobby)); 69 | changeToListner.bindListener(); 70 | 71 | socket.sendCommand({ 72 | type: "lobby", 73 | command: "change to player" 74 | }); 75 | } 76 | else if(!lobby.isHost) { 77 | lobby.isReady = !lobby.isReady; 78 | socket.sendCommand({ 79 | type: "lobby", 80 | command: "set ready", 81 | data: { ready: lobby.isReady } 82 | }); 83 | lobby.updateMainButton(); 84 | } 85 | } 86 | else if(event.keyCode=='39') { 87 | if(!lobby.isSpectator) { 88 | lobby.changeToSpectator(selfName); 89 | } 90 | } 91 | else if(event.keyCode=='38') { 92 | if(lobby.isHost && isAllPlayerReady()) { 93 | lobby.fireMainButtonEvent(); 94 | } 95 | } 96 | } 97 | else if(quiz.inQuiz && hostModal.gameMode !== 'Ranked') { 98 | if(event.keyCode=='40' && event.ctrlKey) { 99 | if(lobby.isHost) { 100 | quiz.startReturnLobbyVote(); 101 | } 102 | } 103 | } 104 | } 105 | 106 | function isAllPlayerReady() { 107 | return (lobby.numberOfPlayers>0 && lobby.numberOfPlayers==lobby.numberOfPlayersReady); 108 | } 109 | 110 | function doc_keyDown(event) { 111 | if(event.shiftKey) { 112 | var maxgroup=Object.keys(quiz.groupSlotMap).length; 113 | if(maxgroup>1) { 114 | var curgroup=parseInt(quiz.avatarContainer.currentGroup); 115 | if(event.keyCode=='33') { 116 | if(curgroup>1) 117 | SelectAvatarGroup(String(curgroup-1)); 118 | } 119 | else if(event.keyCode=='34') { 120 | if(curgroupIt enables some hotkey functions.
283 |[ESC] : remove zombie tooltips
284 |[TAB] : move cursor focus to chat box and answer box
285 |[PgUp] : increase volume
286 |[PgDn] : decrease volume
287 |[Ctrl + M] : toggle mute
288 |[Shift + Enter] : skip
289 |[Shift + Alt + S] : toggle autoskip
290 |[Shift + PgUp] : move box focus to upper box
291 |[Shift + PgDn] : move box focus to lower box
292 |[Shift + Home] : move box focus to box 1
293 |[Shift + End] : move box focus to my box
294 |[Ctrl + Left] : join game in lobby. toggle ready if you joined
295 |[Ctrl + Right] : change to spec in lobby if you joined
296 |[Ctrl + Up] : start game if you are host and all players are ready
297 |[Ctrl + Down] : start vote for returning lobby if game started and you are host
298 |[Alt + 1]: show song history window
299 |[Alt + 2]: show song history info window
300 | ` 301 | }); 302 | -------------------------------------------------------------------------------- /amqMousewheelVolumeControl.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name AMQ Mousewheel Volume Control 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.6 5 | // @description you can adjust volume with mouse wheel. it works in expand library also 6 | // @author nyamu 7 | // @match https://*.animemusicquiz.com/* 8 | // @grant none 9 | // @require https://raw.githubusercontent.com/joske2865/AMQ-Scripts/master/common/amqScriptInfo.js 10 | 11 | // ==/UserScript== 12 | 13 | (function() { 14 | 15 | if (document.getElementById('startPage')) { 16 | return 17 | } 18 | 19 | $("#qpOptionContainer") 20 | .on("wheel", volumeControl); 21 | $("#qpAnimeCenterContainer") 22 | .on("wheel", volumeControl); 23 | $("#qpAvatarRow") 24 | .on("wheel", volumeControl); 25 | $("#elInputContainer") 26 | .on("wheel", volumeControl); 27 | 28 | })(); 29 | 30 | function volumeControl(event) { 31 | var volumetemp=Cookies.get('volume')*1; 32 | if(event.originalEvent.deltaY<0) volumetemp=volumetemp+.05; 33 | else volumetemp=volumetemp-.05; 34 | volumetemp=Math.min(Math.max(volumetemp, 0), 1); 35 | volumeController.volume=volumetemp; 36 | volumeController.adjustVolume(); 37 | volumeController.setMuted(false); 38 | } 39 | 40 | AMQ_addScriptData({ 41 | name: "Mousewheel Volume Control", 42 | author: "nyamu", 43 | description: ` 44 |You can adjust volume with mouse wheel when mouse cursor is over video area or avatar area.
45 | ` 46 | }); 47 | -------------------------------------------------------------------------------- /amqOneGroupGlow.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name AMQ One Group Glow 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.2 5 | // @description 6 | // @author nyamu 7 | // @match https://*.animemusicquiz.com/* 8 | // @grant none 9 | 10 | // ==/UserScript== 11 | 12 | if (document.getElementById('startPage')) { 13 | return 14 | } 15 | 16 | QuizScoreboard.prototype.PLAYER_NEEDED_FOR_SHOWING_CORRECT=1 17 | -------------------------------------------------------------------------------- /catboxVolume.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Catbox Volume 3 | // @namespace https://github.com/nyamu-amq 4 | // @version 0.2 5 | // @description 6 | // @author nyamu 7 | // @match https://*.catbox.moe/* 8 | // @grant none 9 | 10 | // ==/UserScript== 11 | 12 | let video; 13 | 14 | (function() { 15 | video=document.getElementsByTagName('video')[0]; 16 | var volumetemp=localStorage.getItem('volume')*1; 17 | if(!volumetemp) volumetemp=.5; 18 | setElVolume(volumetemp); 19 | document.addEventListener("wheel", volumeControl); 20 | })(); 21 | 22 | function vol() { 23 | if(!video) return .5; 24 | return video.volume*1; 25 | } 26 | 27 | function volumeControl(event) { 28 | var volumetemp=vol(); 29 | volumetemp=Math.min(Math.max(volumetemp+((event.deltaY<0)?.05:-.05), 0), 1); 30 | setElVolume(volumetemp); 31 | } 32 | 33 | function setElVolume(volume) { 34 | if(!video) return; 35 | video.volume=volume; 36 | localStorage.setItem('volume',volume); 37 | } 38 | --------------------------------------------------------------------------------