INNER CODE UNIT · JavaScript

isInlineOnlyScript

Useful-Scripts-Extension/useful-script · popup/index.js:51

function isInlineOnlyScript(scriptOrId) {
  const scriptId = typeof scriptOrId === "string" ? scriptOrId : scriptOrId?.id;
  return typeof scriptOrId === "object" && scriptOrId?._isInlineOnly === true;
}

/**
 * Lazy load a full script when needed (on-demand loading)
 * @param {string|Object} scriptOrId - The script ID or inline script object
 * @returns {Promise<Object>} The full script object with all functions
 */
async function loadFullScript(scriptOrId) {
  const scriptId = typeof scriptOrId === "string" ? scriptOrId : scriptOrId?.id;

  // Return from cache if already loaded
  if (scriptCache.has(scriptId)) {
    return scriptCache.get(scriptId);
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…