Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kamprath/b8b3223f74abc5bfccb6fe45e3c56242 to your computer and use it in GitHub Desktop.
Save Kamprath/b8b3223f74abc5bfccb6fe45e3c56242 to your computer and use it in GitHub Desktop.
Allow Emojis in SSIDs for NETGEAR Genie
// ==UserScript==
// @name Allow Emojis in SSIDs for NETGEAR Genie
// @version 1.0
// @description Removes form validation in NETGEAR Genie's Wireless Network settings to allow emojis in SSIDs.
// @match http://192.168.1.1/*
// @grant none
// ==/UserScript==
(function() {
/**
* Simulates successful form validation
* @return {boolean} Returns true
*/
function checkData() {
var cf = this.contentDocument.forms[0];
// call required checkData() functions
if (typeof this.contentWindow.show_wds_dfs_warn !== 'undefined') {
this.contentWindow.show_wds_dfs_warn();
}
this.contentWindow.dataToHidden(cf);
this.contentWindow.loadData(cf);
return true;
}
var formFrameElement = document.getElementById('formframe'),
formFrameDocument = formFrameElement.contentDocument;
// replace checkData methods once form frames have been loaded
formFrameElement.onload = function() {
var frame2G = formFrameDocument.getElementById('2g_setting'),
frame5G = formFrameDocument.getElementById('5g_setting');
// return if settings frames don't exist or if user cancels prompt
if (!frame2G || !frame5G || !window.confirm('Disable validation to allow emojis in SSIDs?')) {
return;
}
frame2G.contentWindow.checkData = checkData.bind(frame2G);
frame5G.contentWindow.checkData = checkData.bind(frame5G);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment