GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - soderlind/additional-javascript: Use WordPress Customizer to add JavaScript

BranchesTags
Open more actions menu

Latest commit

 

History

43 Commits
43 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
assets
assets
 
 
css
css
 
 
js
js
 
 
vendor
vendor
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README-UPDATER.md
README-UPDATER.md
 
 
README.md
README.md
 
 
additional-javascript.php
additional-javascript.php
 
 
class-custom-javascript-control.php
class-custom-javascript-control.php
 
 
class-github-plugin-updater.php
class-github-plugin-updater.php
 
 
composer.json
composer.json
 
 
composer.lock
composer.lock
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
readme.txt
readme.txt
 
 

Repository files navigation

Additional JavaScript for WordPress Customizer

About

Additional JavaScript for WordPress Customizer lets you add JavaScript code, to the front-end, using the WordPress Customizer - safely and with live preview.

Features

  • Add custom JavaScript through the familiar WordPress Customizer interface
  • Live preview of JavaScript changes
  • Syntax highlighting in the editor
  • Error reporting for JavaScript syntax issues
  • Revision history for your JavaScript code (uses WordPress post revisions)
  • Secure implementation - only users with the 'unfiltered_html' capability can edit JavaScript
  • Clean, minimal interface focused on code editing
  • Works with any WordPress theme

Security

This plugin restricts JavaScript editing to users with the 'unfiltered_html' capability, which by default is only granted to administrators on single site installations and super administrators on multisite installations.

Installation

  • Quick Install

    • Download additional-javascript.zip
    • Upload via Plugins > Add New > Upload Plugin
    • Activate the plugin.
  • Composer Install

    composer require soderlind/additional-javascript
  • Updates

    • Plugin updates are handled automatically via GitHub. No need to manually download and install updates.

Usage

  1. Navigate to Appearance → Customize in your WordPress admin area
  2. Click on the "Additional JavaScript" section at the bottom of the customizer menu
  3. Add your JavaScript code in the editor
  4. See the live preview of your changes
  5. Click "Publish" to apply your JavaScript to the site

Requirements

  • WordPress 6.3 or higher
  • PHP 8.2 or higher
  • User with unfiltered_html capability

Frequently Asked Questions

Who can add JavaScript using this plugin?

Only users with the 'unfiltered_html' capability can add JavaScript using this plugin. By default, this is limited to administrators on single site installations and super administrators on multisite installations.

Will this slow down my site?

No, the plugin is designed to be lightweight and only loads the necessary scripts and styles when needed.

Where is the JavaScript added on my site?

The JavaScript is added at the end of the <head> section of your site with a priority of 110.

Changelog

1.1.4

  • Enhanced class loading for the GitHub plugin updater.

1.1.3

  • Use generic WordPress Plugin GitHub Updater

1.1.2

  • Minor code improvements

1.1.1

  • Add plugin updater

1.1.0

  • Updated compatibility with WordPress 6.5
  • Code improvements and optimization
  • Enhanced security measures

1.0.0

  • Initial release

Copyright and License

Additional JavaScript is copyright 2018-2025 Per Soderlind

Additional JavaScript is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

Additional JavaScript is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/.

About

Use WordPress Customizer to add JavaScript

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.