Last active
August 23, 2024 18:01
-
-
Save lipkau/bd3cdcc65b135e8cfc0555203ba790e3 to your computer and use it in GitHub Desktop.
Userscriptfor fixing the login form from QNAP, as they user a `textarea` for the username and password managers (1password in my case) can't fill it in. https://www.greasespot.net/
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 Fix QNap Login Fields | |
// @description Replace the input field for the QNap login screen for 1password to be able to fill them out | |
// @namespace https://gist.github.com/lipkau/ | |
// @version 0.3 | |
// @author Oliver Lipkau | |
// @match https://nas/cgi-bin/login.html* | |
// @icon https://www.google.com/s2/favicons?domain=myqnapcloud.com | |
// @grant GM_info | |
// @require https://code.jquery.com/jquery-3.6.0.min.js#sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4= | |
// @updateURL https://gist.github.com/lipkau/bd3cdcc65b135e8cfc0555203ba790e3/raw/FixQNapLoginFields.user.js | |
// @downloadURL https://gist.github.com/lipkau/bd3cdcc65b135e8cfc0555203ba790e3/raw/FixQNapLoginFields.user.js | |
// @supportURL https://gist.github.com/lipkau/bd3cdcc65b135e8cfc0555203ba790e3 | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
console.debug('Loaded userscript', GM.info.script.name, GM.info.script.version); | |
const textarea = $('textarea#username'); | |
if (textarea) { | |
const input = $('<input type="text">'); | |
$.each(textarea.get(0).attributes, (index, attr) => { | |
input.attr(attr.nodeName, attr.nodeValue); | |
}); | |
textarea.after(input).remove(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment