Skip to content

Instantly share code, notes, and snippets.

View andresgallo's full-sized avatar

Andres Gallo andresgallo

View GitHub Profile
.ContactUs-sectionNavigation .Navigation-items.flickity-enabled:focus,.ModulePage-sectionNavigation .Navigation-items.flickity-enabled:focus,.SearchResultsPage-sectionNavigation .Navigation-items.flickity-enabled:focus,.SectionPage-sectionNavigation .Navigation-items.flickity-enabled:focus,.TagPage-sectionNavigation .Navigation-items.flickity-enabled:focus,.plyr input[type=range]:focus,.plyr:focus,.plyr__controls button:focus,[data-icon]:focus,div:focus,header .ArticlePageFullLead-navigation .NavigationItem-dropdown:focus,header .ArticlePageSmallLead-navigation .NavigationItem-dropdown:focus,header .ArticlePageTextLead-navigation .NavigationItem-dropdown:focus,header .AuthorPage-navigation .NavigationItem-dropdown:focus,header .CareerPostingPage-navigation .NavigationItem-dropdown:focus,header .ContactUs-navigation .NavigationItem-dropdown:focus,header .EmployeePage-navigation .NavigationItem-dropdown:focus,header .ListiclePage-navigation .NavigationItem-dropdown:focus,header .ModulePage-navigation .Navigatio
// We often have a cookie utility to make handling of cookies the same
tp = window.tp || [];
tp.push(["setAid", SOME ID]);
tp.push(["setCookieDomain", COOKIE_DOMAIN]);
tp.push( [ "addHandler", "startCheckout", function () {
window.sessionStorage.setItem("noreload", "true")
}]);
<div class="Page-byline">
<div class="Page-authors">
{{#if authors}}
<span>{{~format "/page/Page" "authorBy"~}}</span>
{{#set authorsCount=(length authors)}}
{{~#each authors~}}
{{~#not (or @first @last)~}}
,&nbsp;
{{~else~}}
<head>
<meta charset="{{#with charset}}{{this}}{{else}}UTF-8{{/with}}">
{{~#with meta}}{{this}}{{/with~}}
{{include "/articlesource/ArticleSource.hbs" this}}
<style type="text/css">{{include "/global/Colors.hbs" this}}</style>
<style type="text/css">{{include "/global/Typography.hbs" this}}</style>
<link data-cssvarsponyfill="true" class="Webpack-css" rel="stylesheet" href="{{cdn "/styleguide/All.min.css"}}">
@andresgallo
andresgallo / Fetch.js
Last active August 7, 2024 15:08
Fetch
((url) => {
fetch(url)
.then(function(response) {
return response.text()
})
.then(function(html) {
var parser = new DOMParser();
var doc = parser.parseFromString(html, "text/html");
console.log('HEREEEE', doc);
// this.innerHTML = doc.documentElement.innerHTML
{ "_exampleOnly" : true, "_template" : "/author/AuthorPage.hbs", "_wrapper" : false, "above" : [ ], "actions" : [ { "_template" : "/action-bar/ActionBar.hbs", "items" : [ { "_template" : "/twitter/intent/TwitterTweetButton.hbs", "body" : "Tweet", "hashtags" : "", "text" : "Amazon%20Pay%20Team", "url" : "https%3A%2F%2Fpay.amazon.com%2Famazon-pay-team" }, { "_template" : "/linkedin/LinkedInShareButton.hbs", "body" : "LinkedIn", "source" : "Amazon%20Pay%20-%20US", "summary" : "Amazon%20Pay%27s%20team%20of%20content%20editors%20and%20writers.", "title" : "Amazon%20Pay%20Team", "url" : "https%3A%2F%2Fpay.amazon.com%2Famazon-pay-team" } ] } ], "aside" : [ ], "authorSocialLinks" : [ ], "banner" : [ ], "below" : [ { "_styledTemplate" : "/page/list/PayTalks.hbs", "_template" : "/page/list/PageList.hbs", "anchorId" : "list-fd0000", "headerPaddingGap" : "0", "items" : [ { "_template" : "/page/promo/PagePromo.hbs", "authorImage" : [ { "_template" : "/image/Image.hbs", "alt" : "Pay_Logo_Insights._CB1560544342_.svg", "imag
const END_TIME_INRANGE = (
individual.endTime >= available.startTime ||
individual.endTime <= available.endTime
)
const START_TIME_INRANGE = (
individual.startTimeTime >= available.startTime ||
individual.startTimeTime <= available.endTime
)
if (START_TIME_INRANGE || END_TIME_INRANGE) {
<bsp-jw-player data-video-player class="JWVideoPlayer"
data-player="{{playerId}}"
data-media-id="{{mediaId}}"
data-video-title="{{videoTitle}}"
data-video-uuid="{{videoUuid}}"
data-video-file-type="{{videoFileType}}"
data-video-pauseads="{{pauseads}}"
{{#with orientation}} data-orientation="{{this}}" {{/with}}
{{#if poster}}{{#resize poster (not orientation otherwise="videoPosterPortrait" then="videoPoster")}} poster="{{src}}" {{/resize}}{{/if}}
{{#if autoplay}}autoplay{{/if}}
@andresgallo
andresgallo / regexs
Last active October 6, 2023 04:01
Format
\(format([^()"]*"[^()"]*[^()"]*"*)\)
@andresgallo
andresgallo / file
Last active September 27, 2023 13:36
{{#each (and tagNavigation tagNavigation.[0] then=tagNavigation otherwise=sectionNavigation)}}
<div class="SectionPage-sectionNavigation" data-align-{{#with ../sectionNavAlign}}{{this}}{{else}}center{{/with}} {{#if ../sectionNavInsidePageHeading}}data-inside-heading{{/if}} style="
--color-section-nav-background: {{#with ../sectionNavBgColor}}{{this}}{{else}}{{#if ../sectionNavInsidePageHeading}}transparent{{else}}#000000{{/if}}{{/with}};
--color-section-nav-text: {{#with ../sectionNavTextColor}}{{this}}{{else}}var(--color-primary-text-inverse){{/with}};
--color-section-nav-text-hover: {{#with ../sectionNavTextHoverColor}}{{this}}{{else}}var(--color-primary-text-inverse){{/with}};">
{{include "/navigation/SectionNavigation.hbs" this}}
</div>
{{/each}}