If you get error:
run npm command gives error "/usr/bin/env: node: No such file or directory
in file watcher
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip | |
# under public domain terms | |
country_bounding_boxes = { | |
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)), | |
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)), | |
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)), | |
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)), | |
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)), | |
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)), |
/** | |
* @file A WordPress-like hook system for JavaScript. | |
* | |
* This file demonstrates a simple hook system for JavaScript based on the hook | |
* system in WordPress. The purpose of this is to make your code extensible and | |
* allowing other developers to hook into your code with their own callbacks. | |
* | |
* There are other ways to do this, but this will feel right at home for | |
* WordPress developers. | |
* |
/* Customize website's scrollbar like Mac OS | |
Not supports in Firefox and IE */ | |
/* total width */ | |
body::-webkit-scrollbar { | |
background-color: #fff; | |
width: 16px; | |
} | |
/* background of the scrollbar except button or resizer */ |
:root { | |
--violation-color: red; /* used for clear issues */ | |
--warning-color: orange; /* used for potential issues we should look into */ | |
} | |
/* IMAGES */ | |
/* | |
* Lazy-Loaded Images Check | |
* ==== |
RewriteRule "(^|/)\.(?!well-known\/)" - [F] |
Accessibility Panel - JS Controls | |
--------------------------------- | |
Converted Wordpress Plugin Example of an Accessibility Panel made with Javascript to control visual design of a HTML / CSS for users with visual disabilities to explore the content. This example is scalable for any layout based on which targets are bing using for the containers, text and link variables. | |
A [Pen](https://codepen.io/DougCrossDesign/pen/RjyaYZ) by [Doug Cross](https://codepen.io/DougCrossDesign) on [CodePen](https://codepen.io). | |
[License](https://codepen.io/DougCrossDesign/pen/RjyaYZ/license). |
function resize(ele, size, classname){ | |
var elem = document.getElementsByTagName(ele); | |
for (var i=0; i<elem.length; i++) | |
{ | |
if (elem[i].className==classname) { | |
elem[i].style.fontSize=size; | |
} | |
} | |
} |
untrailingSlashIt(str) { | |
return str.replace(/\/$/, ''); | |
} | |
trailingSlashIt(str) { | |
return untrailingSlashIt(str) + '/'; | |
} |
<?php | |
/* Add body-class for top-level parent Page or Category */ | |
function topcatpg_body_class( $class ) { | |
$prefix = 'topic-'; // Editable class name prefix. | |
$top_cat_pg = 'home'; // Default. | |
global $top_cat_pg; | |
// Get class name from top-level Category or Page. | |
global $wp_query; | |
if ( is_single() ) { |