MCPcopy Create free account
hub / github.com/SKVNDR/FastDork / saveImportListPreference

Function saveImportListPreference

Script/FastDork.js:3107–3138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3105 console.log("--- FastDork.js: DOMContentLoaded END ---");
3106
3107 async function saveImportListPreference() {
3108 if (!UI.importBtn || !UI.listTab2) return;
3109
3110 const domainKey = UI.importBtn.dataset.contextKey;
3111 const selectedListKey = UI.listTab2.value;
3112
3113 if (!domainKey) {
3114 console.warn(
3115 "[saveImportListPreference] Could not find domainKey on button."
3116 );
3117 return;
3118 }
3119
3120 if (selectedListKey && selectedListKey !== "0") {
3121 const storageLookupKey = `tab2Save-${domainKey}`;
3122 try {
3123 await setStorageData({ [storageLookupKey]: selectedListKey });
3124 console.log(
3125 `[saveImportListPreference] Saved list preference for ${domainKey}: ${selectedListKey}`
3126 );
3127 } catch (error) {
3128 console.error(
3129 `[saveImportListPreference] Error saving list preference for ${domainKey}:`,
3130 error
3131 );
3132 }
3133 } else {
3134 console.log(
3135 `[saveImportListPreference] No valid list selected, preference not saved for ${domainKey}.`
3136 );
3137 }
3138 }
3139
3140 function validateDorkOptionsModal() {
3141 if (

Callers 1

setupImportButtonFunction · 0.85

Calls 1

setStorageDataFunction · 0.70

Tested by

no test coverage detected