{"id":13372,"date":"2011-05-24T05:32:11","date_gmt":"2011-05-24T05:32:11","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/genesis-js-no-js\/"},"modified":"2017-11-30T19:47:47","modified_gmt":"2017-11-30T19:47:47","slug":"genesis-js-no-js","status":"publish","type":"plugin","link":"https:\/\/sk.wordpress.org\/plugins\/genesis-js-no-js\/","author":7445142,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"3.2.1","stable_tag":"3.2.1","tested":"4.9.29","requires":"4.6","requires_php":"7.0","requires_plugins":"","header_name":"Genesis JS \/ No JS","header_author":"Gary Jones","header_description":"","assets_banners_color":"cccccc","last_updated":"2017-11-30 19:47:47","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/code.garyjones.co.uk\/donate\/","header_plugin_uri":"https:\/\/github.com\/GaryJones\/genesis-js-no-js","header_author_uri":"https:\/\/gamajo.com","rating":5,"author_block_rating":0,"active_installs":100,"downloads":13193,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"3.2.0":"<p>Requires PHP 7.0 and WordPress 4.6.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1778153","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1778153","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":"1778153","resolution":"1544x500","location":"assets"},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"1778153","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","2.0.0","2.1.0","3.2.0","3.2.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[4445,31837],"plugin_category":[43],"plugin_contributors":[78161],"plugin_business_model":[],"class_list":["post-13372","plugin","type-plugin","status-publish","hentry","plugin_tags-genesis","plugin_tags-js-no-js","plugin_category-customization","plugin_contributors-garyj","plugin_committers-garyj"],"banners":{"banner":"https:\/\/ps.w.org\/genesis-js-no-js\/assets\/banner-772x250.jpg?rev=1778153","banner_2x":"https:\/\/ps.w.org\/genesis-js-no-js\/assets\/banner-1544x500.jpg?rev=1778153","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/genesis-js-no-js\/assets\/icon-128x128.png?rev=1778153","icon_2x":"https:\/\/ps.w.org\/genesis-js-no-js\/assets\/icon-256x256.png?rev=1778153","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Make front end styling easier for child themes on the <a href=\"http:\/\/genesis-theme-framework.com\/\">Genesis Framework<\/a> based on whether JavaScript is enabled or not.<\/p>\n\n<p>Adds a <code>no-js<\/code> body class to the front end, and a script on <code>genesis_before<\/code> which immediately changes the class to <code>js<\/code> if JavaScript is enabled.\nThis is how WP does things on the back end, to allow different styles for the same elements depending if JavaScript is active or not.<\/p>\n\n<p>This plugin is only useful if you're using a child theme of the Genesis Framework since it uses the <code>genesis_before<\/code> hook.<\/p>\n\n<!--section=installation-->\n<p>Once this plugin is installed and activated, then it will work automatically. There are no options, and nothing to set-up.<\/p>\n\n<h4>Upload<\/h4>\n\n<ol>\n<li>Download the latest tagged archive (choose the \"zip\" option).<\/li>\n<li>Go to the <strong>Plugins -&gt; Add New<\/strong> screen and click the <strong>Upload<\/strong> tab.<\/li>\n<li>Upload the zipped archive directly.<\/li>\n<li>Go to the Plugins screen and click <strong>Activate<\/strong>.<\/li>\n<\/ol>\n\n<h4>Manual<\/h4>\n\n<ol>\n<li>Download the latest tagged archive (choose the \"zip\" option).<\/li>\n<li>Unzip the archive.<\/li>\n<li>Copy the folder to your <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Go to the Plugins screen and click <strong>Activate<\/strong>.<\/li>\n<\/ol>\n\n<p>Check out the Codex for more information about <a href=\"http:\/\/codex.wordpress.org\/Managing_Plugins#Manual_Plugin_Installation\">installing plugins manually<\/a>.<\/p>\n\n<h4>Git<\/h4>\n\n<p>Using git, browse to your <code>\/wp-content\/plugins\/<\/code> directory and clone this repository:<\/p>\n\n<pre><code>git clone git@github.com:GaryJones\/genesis-js-no-js.git\n<\/code><\/pre>\n\n<p>Then go to your Plugins screen and click <strong>Activate<\/strong>.<\/p>\n\n<h4>Composer<\/h4>\n\n<pre><code>composer require gamajo\/genesis-js-no-js\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><p>Once this plugin is installed and activated, then it will work automatically. There are no options, and nothing to set-up.<\/p>\n\n<h4>Upload<\/h4>\n\n<ol>\n<li>Download the latest tagged archive (choose the \"zip\" option).<\/li>\n<li>Go to the <strong>Plugins -&gt; Add New<\/strong> screen and click the <strong>Upload<\/strong> tab.<\/li>\n<li>Upload the zipped archive directly.<\/li>\n<li>Go to the Plugins screen and click <strong>Activate<\/strong>.<\/li>\n<\/ol>\n\n<h4>Manual<\/h4>\n\n<ol>\n<li>Download the latest tagged archive (choose the \"zip\" option).<\/li>\n<li>Unzip the archive.<\/li>\n<li>Copy the folder to your <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Go to the Plugins screen and click <strong>Activate<\/strong>.<\/li>\n<\/ol>\n\n<p>Check out the Codex for more information about <a href=\"http:\/\/codex.wordpress.org\/Managing_Plugins#Manual_Plugin_Installation\">installing plugins manually<\/a>.<\/p>\n\n<h4>Git<\/h4>\n\n<p>Using git, browse to your <code>\/wp-content\/plugins\/<\/code> directory and clone this repository:<\/p>\n\n<pre><code>git clone git@github.com:GaryJones\/genesis-js-no-js.git\n<\/code><\/pre>\n\n<p>Then go to your Plugins screen and click <strong>Activate<\/strong>.<\/p>\n\n<h4>Composer<\/h4>\n\n<pre><code>composer require gamajo\/genesis-js-no-js\n<\/code><\/pre><\/dd>\n<dt>What does this plugin actually do?<\/dt>\n<dd><p>If you look at the source of a WordPress back end page, you'll see it has a body class of <code>no-js<\/code>. Immediately after the opening <code>body<\/code> tag is a small script which replaces <code>no-js<\/code> with <code>js<\/code> (you can see the amended class with browser developer tools).<\/p>\n\n<p>WordPress uses this to apply different styles to the same elements, depending on whether JavaScript is present or not.<\/p>\n\n<p>This plugin recreates the same effect, but for the front end of <a href=\"http:\/\/genesis-theme-framework.com\/\">Genesis Framework<\/a> child themes.<\/p><\/dd>\n<dt>Shouldn't the script be at the end of the page?<\/dt>\n<dd><p>Usually, yes, but it's a fairly small script, so does not block rendering of other content for any noticeable length of time.<\/p>\n\n<p>Doing it immediately also reduces a flash of incorrectly styled content, as the page does not load with <code>no-js<\/code> styles, then switch to <code>js<\/code> once everything has finished loading.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>See <a href=\"https:\/\/github.com\/GaryJones\/genesis-js-no-js\/blob\/master\/CHANGELOG.md\">CHANGELOG.md<\/a> for all of the changes.<\/p>","raw_excerpt":"Make front end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/13372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=13372"}],"author":[{"embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/garyj"}],"wp:attachment":[{"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=13372"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=13372"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=13372"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=13372"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=13372"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=13372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}