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

Method saveSort

Pagetual/pagetual.user.js:9909–9927  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9907 }
9908 }
9909 saveSort() {
9910 let sort = [];
9911 [].forEach.call(this.item.parentNode.querySelectorAll("p[data-id]"), i => {
9912 sort.push(i.dataset.id);
9913 });
9914 rulesData.sort = sort;
9915 let urls = [];
9916 sort.forEach(id => {
9917 for (let s = 0; s < ruleUrls.length; s++) {
9918 if (id == ruleUrls[s].id) {
9919 urls.push(ruleUrls[s]);
9920 break;
9921 }
9922 }
9923 });
9924 ruleUrls = urls;
9925 storage.setItem("rulesData", rulesData);
9926 showTips(i18n("sortTitle"));
9927 }
9928 moveUp() {
9929 let preE = this.item.previousElementSibling;
9930 if (compareNodeName(preE, ["p"]) && preE.children.length > 1) {

Callers 2

moveUpMethod · 0.95
moveDownMethod · 0.95

Calls 2

showTipsFunction · 0.85
i18nFunction · 0.70

Tested by

no test coverage detected