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
/** | |
* @private | |
* | |
* Converts a given string to a valid attribute name | |
* | |
* @param {String} string - Any non-empty string | |
* @returns {String} - A string that can safely be used as an attribute name in the DOM | |
*/ | |
function toAttributeName(string) { | |
return string |
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 Rating stats for performers | |
// @author Maista | |
// @namespace com.maista.userscripts | |
// @version 1.0 | |
// @require https://gist.githubusercontent.com/Maista6969/aaf8f04b1af7603ed27866e9e7f46a02/raw/53f00a1ccc3370e65af4735c46bcc0a71ac5ef77/onElementReady.js | |
// @include http://localhost:9999/* | |
// @grant GM_xmlhttpRequest | |
// @icon http://localhost:9999/favicon.ico | |
// ==/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 Rating stats for studios | |
// @author Maista | |
// @namespace com.maista.userscripts | |
// @version 1.0 | |
// @require https://gist.githubusercontent.com/Maista6969/aaf8f04b1af7603ed27866e9e7f46a02/raw/53f00a1ccc3370e65af4735c46bcc0a71ac5ef77/onElementReady.js | |
// @include http://localhost:9999/* | |
// @grant GM_xmlhttpRequest | |
// @icon http://localhost:9999/favicon.ico | |
// ==/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
local ordered_table = {} | |
--[[ | |
This implementation of ordered table does not hold performance above functionality. | |
It invokes a metamethod `__newindex` for every access, and | |
while this is not ideal performance wise, the resulting table behaves very closely to | |
a standard Lua table, with the quirk that the keys are ordered by when they are first seen | |
(unless deleted and then reinserted.) | |
--]] | |
-- private unique keys | |
local _values = {} |