MCPcopy Index your code
hub / github.com/hoothin/UserScripts / setListData

Function setListData

Pagetual/pagetual.user.js:4492–4506  ·  view source on GitHub ↗
(list, key, value, length)

Source from the content-addressed store, hash-verified

4490 });
4491 }
4492 function setListData(list, key, value, length) {
4493 storage.getItem(list, listData => {
4494 if (!listData) {
4495 listData = [];
4496 }
4497 listData = listData.filter(data => data && data.k !== key);
4498 if (value !== "") {
4499 listData.unshift({k: key, v: value});
4500 if (listData.length > (length || 100)) {
4501 listData.pop();
4502 }
4503 }
4504 storage.setItem(list, listData);
4505 });
4506 }
4507 const isMobile = ('ontouchstart' in document.documentElement && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
4508 const cnConfigPage = "https://pagetual.hoothin.com/cn/rule.html";
4509 const configPage = ["https://pagetual.hoothin.com/rule.html",

Callers 8

initMethod · 0.85
initMethod · 0.85
clickRadioMethod · 0.85
initMethod · 0.85
initRulesFunction · 0.85
initPageFunction · 0.85
changeStopFunction · 0.85
initListenerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected