RTO_addRemoveDomain.js
Helper file documentation for
RTO_addRemoveDomain.js.Docs updated: 2025-12-17
Summary
Allow-list UI binder.
- Exports:
RTOAllowlistUI - Depends on: RTO_domainList.js
What it is
UI binder for allow-list management. You provide selectors for your inputs/buttons; it wires clicks and renders the list.
Download
Download RTO_addRemoveDomain.jsExample
<input id="hostInput" value="example.com" />
<button id="btnAdd">Add</button>
<button id="btnCheck">Check</button>
<button id="btnRemove">Remove</button>
<div id="msg" style="display:none"></div>
<div id="listWrap" style="display:none"><ul id="list"></ul></div>
<script src="../RTO_helpers/RTO_domainList.js"></script>
<script src="../RTO_helpers/RTO_addRemoveDomain.js"></script>
<script>
RTOAllowlistUI.bind({
host: document.getElementById("hostInput").value,
addBtn: "#btnAdd",
checkBtn: "#btnCheck",
removeBtn: "#btnRemove",
msgEl: "#msg",
listWrap: "#listWrap",
listEl: "#list"
});
</script>
Config fields
host: host string (example:example.com)addBtn,checkBtn,removeBtnmsgEl: element selector where messages are shownlistWrapandlistElto render the allow-list