This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function pad(type = "right", width = 2, padchar = "0") { | |
return function(value = '0') { | |
value = value.toString(); | |
while (value.length < width) { | |
if ("left" === type) { | |
value = `${padchar}${value}`; | |
} else { | |
value = `${value}${padchar}`; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#masthead-ad, #module_sky_scraper, #nav_ad, #overlayadd, #popupAd, #quigo-ad, #rightAd160x600, #rotating-ads-wrap, #sensis_island_ad_3_column, #sidebar-main-ad, #skyscraper-ad-2, #sponsored-links-container, #ss-ad-overlay, #td_sponsorAd, #topadsdiv, #verticalAds, #wide_ad_unit_top, #zMSplacement5, .AdvtSample2, .LargeRightAd, .ShootingAdLeft, .aalb-pc-ad-unit, .ad-300-250-600, .ad-banner-vertical, .ad-container-leaderboard, .ad-identifier, .ad-midleader, .ad-rh, .ad-spot, .ad-with-background, .ad300x-placeholder, .adAreaLC, .adContainerRectangle, .adMeldGuts, .adSupertower, .ad_326x260, .ad_border_true, .ad_group, .ad_mrec_title_article, .ad_spot_c, .adblade, .adlarge, .ads-iframe, .ads160, .adsTop, .ads_leader, .adsc, .adsense_small_square, .adspace_buysell, .adv--desktop-top, .advDesktop300x250, .advert--banner-wrap, .advert8, .advertise_carousel, .advertisement_container, .advertplay, .articleAd300x250, .bam-dcRefreshableAd, .banner_ads1, .billboard_ad, .block-sponsored-links, .bottom-large-google-ad, .box |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
box-sizing: border-box; | |
} | |
*, | |
*::before, | |
*::after { | |
box-sizing: inherit; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<img width="width" height="height" :alt=" alt ? alt : altDefault " :src="trans" :data-src="src" v-on:error="handleNotFound( $event )"/> | |
</template> | |
<script> | |
import '../lib/intersection-observer'; | |
import { getCustomPath } from '../helper-functions/ramda-functions'; | |
export default { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function path(paths, obj) { | |
let val = obj; | |
let idx = 0; | |
while (idx < paths.length) { | |
if ( null == val ) { | |
return; | |
} | |
val = val[ paths[ idx ] ]; | |
idx += 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add rest api endpoint for category listing | |
*/ | |
/** | |
* Class Category_List_Rest | |
*/ | |
class Category_List_Rest extends WP_REST_Controller { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"browser": true | |
}, | |
"plugins": [ | |
"html" | |
], | |
"settings": { | |
"html/html-extensions": [".html", ".vue", ".php"] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const promise = new Promise ( ( resolve, reject ) => { | |
setTimeout( ()=>{ | |
resolve( 'success' ); | |
}, 300); | |
setTimeout( () =>{ | |
reject( 'error' ); | |
}, 25); | |
} ); | |
promise.then( (res)=>{ | |
console.log( res ); |