Last active
February 7, 2020 05:58
-
-
Save moyashi/4c009686680ca053bed9ce86dd50f67c to your computer and use it in GitHub Desktop.
OptoPrintでページ表示後に「Connect」ボタンを自動的に押すUserScript
This file contains hidden or 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 PrinterConnect | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://192.168.1.33/ | |
// @match http://192.168.1.32/ | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var connect = function(){ | |
if ($("#printer_connect").text() == "Connect") { | |
$("#printer_connect").click(); | |
} | |
} | |
setTimeout(connect, 5000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tampermonkeyで動作確認
https://www.tampermonkey.net/