Skip to content

Instantly share code, notes, and snippets.

@moyashi

moyashi/PrinterConnect.js

Last active Feb 7, 2020
Embed
What would you like to do?
OptoPrintでページ表示後に「Connect」ボタンを自動的に押すUserScript
// ==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);
})();
@moyashi

This comment has been minimized.

Copy link
Owner Author

@moyashi moyashi commented Feb 7, 2020

Tampermonkeyで動作確認
https://www.tampermonkey.net/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.