Last active
June 4, 2021 01:02
-
-
Save ozero/0134b04f0529f406405f88747d50b574 to your computer and use it in GitHub Desktop.
メロスはAhamoサポートチャットに激怒した。いくらリロードしてチャットボタンをクリックしてもつながらないのだ。メロスは、単純な男であった。激怒に任せてリロード次第「チャットを開く」ボタンを自動クリックするuserscriptを書いたのだ。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Ahamo chat starter | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Ahamo chat starter | |
// @author You | |
// @match https://ahamo.com/chat/ | |
// @icon https://www.google.com/s2/favicons?domain=ahamo.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
setTimeout(function(){ | |
//let els_chat = $(".js-chat-window-opener"); | |
//els_chat.click(); | |
var clickMe_s = document.getElementsByClassName("js-chat-window-opener"); | |
var event = document.createEvent( "MouseEvents" ); // イベントオブジェクトを作成 | |
event.initEvent("click", false, true); // イベントの内容を設定 | |
clickMe_s[0].dispatchEvent(event); // イベントを発火させる | |
},1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment