Skip to content

javen-wangjunren/elementor-website-skill / elementor-widget-pipeline

elementor-widget-pipeline

Verified

把确认版模块 HTML、整页 HTML 中指定的 Section,或合格的简单强参考模块,以克制字段实现为 Elementor Widget。用于新增或迁移单个已确认 Widget,并消费标准或加强设计评审上下文,验证同视口保真、完整状态、快速反向操作、编辑器重渲染和多实例;不重新设计或评分,不用于批量整页、旧 Widget 排错、主题开发或发布。

templates/widget-js.js

View on GitHub
(function ($) {
  'use strict';

  var selector = '[data-your-widget]';
  var instances = [];

  function createInstance(root) {
    var cleanups = [];

    function addCleanup(fn) {
      if (typeof fn === 'function') cleanups.push(fn);
    }

    // Initialize scoped listeners, observers, timers, RAF or video here.
    // Every long-lived resource must register its teardown with addCleanup().

    return {
      root: root,
      destroy: function () {
        for (var i = cleanups.length - 1; i >= 0; i--) cleanups[i]();
        cleanups = [];
        delete root.dataset.yourWidgetInit;
      },
      addCleanup: addCleanup
    };
  }

  function pruneDisconnected() {
    for (var i = instances.length - 1; i >= 0; i--) {
      if (!instances[i].root.isConnected) {
        instances[i].destroy();
        instances.splice(i, 1);
      }
    }
  }

  function initInstance(root) {
    if (!root || root.dataset.yourWidgetInit === '1') return;
    root.dataset.yourWidgetInit = '1';
    instances.push(createInstance(root));
  }

  function initAll(context) {
    pruneDisconnected();
    var root = context || document;
    var els = [];

    if (root.nodeType === 1 && root.matches(selector)) {
      els.push(root);
    }

    var descendants = root.querySelectorAll ? root.querySelectorAll(selector) : [];
    for (var i = 0; i < descendants.length; i++) els.push(descendants[i]);

    for (var i = 0; i < els.length; i++) initInstance(els[i]);
  }

  function registerElementorHook() {
    if (!window.elementorFrontend || !window.elementorFrontend.hooks) return;

    window.elementorFrontend.hooks.addAction(
      'frontend/element_ready/your-widget-name.default',
      function ($scope) {
        var scope = $scope && $scope[0] ? $scope[0] : null;
        if (scope) initAll(scope);
      }
    );
  }

  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', function () {
      initAll(document);
    });
  } else {
    initAll(document);
  }

  if (window.elementorFrontend && window.elementorFrontend.hooks) {
    registerElementorHook();
  } else if ($) {
    $(window).on('elementor/frontend/init', registerElementorHook);
  }

  window.addEventListener('pagehide', function () {
    for (var i = instances.length - 1; i >= 0; i--) instances[i].destroy();
    instances = [];
  }, { once: true });
})(window.jQuery);
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall