Edit with PageLayer

Adds an Edit with Pagelayer button on the top bar of a Wordpress site while editing it, so you don't have to go through the default editor to get to PageLayer.

  1. // ==UserScript==
  2. // @name Edit with PageLayer
  3. // @namespace StephenP
  4. // @match https://example.com/*
  5. // @grant none
  6. // @version 1.0
  7. // @namespace StephenP
  8. // @description Adds an Edit with Pagelayer button on the top bar of a Wordpress site while editing it, so you don't have to go through the default editor to get to PageLayer.
  9. // @license CC-BY-NC-SA-4.0
  10. // @contributionURL https://buymeacoffee.com/stephenp_greasyfork
  11. // ==/UserScript==
  12. const editBtn=document.getElementById("wp-admin-bar-edit");
  13. if(editBtn){
  14. let plBtn=editBtn.cloneNode(true);
  15. plBtn.id="wp-admin-bar-pagelayer-edit";
  16. plBtn.firstChild.href=window.location.href+"?&pagelayer-live=1";
  17. plBtn.firstChild.innerText=plBtn.firstChild.innerText+" (PageLayer)";
  18. editBtn.parentNode.appendChild(plBtn);
  19. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址