Hides blueprints and macros from wizards or autocomplete on the current page.

The bookmarklet removes tools from the page currently shown in the browser.

The projectdoc tools (doctypes and macros) are removed in the following locations:

  1. Blueprints in the Blueprint Selection Wizard
  2. Macros in the Macro Browser
  3. Macros from the Autocomplete Menu

The bookmarklet removes these elements provided by the projectdoc Toolbox, but the script can be easily adjusted to remove tools from other apps.

Bookmarklet

Ready to use!

Error rendering macro 'projectdoc-bookmarklet-button-macro'

org/apache/commons/lang/StringUtils

Code

hide-projectoc-tools.js
if (AJS) {
  AJS.toInit(function () {
    function hideElements($element) {
      if ($element) {
        $element.css("display", "none");
      }
    }

    function hideSpaceBlueprints() {
      const $templateElements = AJS.$('#create-dialog .templates .template[data-blueprint-module-complete-key*="projectdoc"][data-create-result="space"]');
      hideElements($templateElements);
    }
    function hidePageBlueprints() {
      const $templateElements = AJS.$('#create-dialog .templates .template[data-blueprint-module-complete-key*="projectdoc"]:not([data-create-result="space"])');
      hideElements($templateElements);
    }
    function hideMacros() {
      const $macroElements = AJS.$('#select-macro-page .dialog-page-body .macro-list-item[id*="projectdoc"]');
      hideElements($macroElements);
    }
    function hideAutocompleteMacros() {
      const $macroElements = AJS.$('li>a[class*="autocomplete-macro-projectdoc"]');
      if ($macroElements) {
        $macroElements.parent().css("display", "none");
      }
    }

    hideSpaceBlueprints();
    hidePageBlueprints();
    hideMacros();
    hideAutocompleteMacros();
  });
}

Details

The following screenshots show the bookmarklet in action.

Space Blueprint Wizard with projectdoc Blueprints

Space Blueprint Wizard without projectdoc Blueprints

Page Blueprint Wizard with projectdoc Blueprints
Screenshot showing the Blueprint Wizard with projectdoc Blueprints
Screenshot showing the Blueprint Wizard with projectdoc Blueprints
Page Blueprint Wizard without projectdoc Blueprints
Screenshot showing the Blueprint Wizard without projectdoc Blueprints
Screenshot showing the Blueprint Wizard without projectdoc Blueprints
Macro Browser with projectdoc Macros
Screenshot showing the Macro Browser with projectdoc Macros
Screenshot showing the Macro Browser with projectdoc Macros
Macro Browser without projectdoc Macros
Screenshot showing the Macro Browser without projectdoc Macros
Screenshot showing the Macro Browser without projectdoc Macros

Resources

Hide projectdoc Tools within Browser
The projectdoc Toolbox installs a lot of macros and additional doctype add-ons install a lot of doctypes. This tips shows ways that allow to remove the projectdoc tools from the current page.
Hide projectdoc Tools
Userscript: Removes projectdoc tools (blueprints and macros) from the current page.
Hide projectdoc Tools
Confluence Userscript: Removes projectdoc tools (blueprints and macros) from the current page.
projectdoc Toolbox Online Manual
The online manual for the projectdoc Toolbox for Confluence.