sfc-utils 1.4.147 → 1.4.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,31 +61,33 @@ function appendLayoutScripts(isEmbedded, isAdRemoved, marketKey, category) {
|
|
|
61
61
|
link.rel = "stylesheet";
|
|
62
62
|
link.href = `https://htlbid.com/v3/${shortDomain}/hnpbid.css`;
|
|
63
63
|
document.head.appendChild(link);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
window.hnpbid.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
// Add vars after timeout
|
|
66
|
+
if (window.hnpbid) {
|
|
67
|
+
console.log("hnpbid exists");
|
|
68
|
+
window.hnpbid = window.hnpbid || {};
|
|
69
|
+
window.hnpbid.cmd = window.hnpbid.cmd || [];
|
|
70
|
+
window.hnpbid.cmd.push(() => {
|
|
71
|
+
window.hnpbid.setTargeting(
|
|
72
|
+
"is_testing",
|
|
73
|
+
currentEnv === "production" ? "no" : "yes"
|
|
74
|
+
); // Set to "no" for production
|
|
75
|
+
window.hnpbid.setTargeting("is_home", "no"); // Set to "yes" on the homepage
|
|
76
|
+
window.hnpbid.setTargeting("post_id", `${fullURL}`);
|
|
77
|
+
window.hnpbid.setTargeting("category", category || "news");
|
|
78
|
+
// init
|
|
79
|
+
window.hnpbid.layout();
|
|
80
|
+
});
|
|
81
|
+
} else {
|
|
82
|
+
console.log("hnpbid does not exist");
|
|
83
|
+
// If global var was not defined, start Juice
|
|
84
|
+
let script = document.createElement("script");
|
|
85
|
+
script.type = "text/javascript";
|
|
86
|
+
script.id = "adPositionManagerScriptTag";
|
|
87
|
+
script.src = "https://aps.hearstnp.com/Scripts/loadAds.js";
|
|
88
|
+
document.body.appendChild(script);
|
|
89
|
+
}
|
|
90
|
+
}, 1000);
|
|
89
91
|
} else {
|
|
90
92
|
console.log("juice fallback");
|
|
91
93
|
// If no category, this is the old version and we're supporting Juice (expires in Nov 2024)
|
|
@@ -174,7 +174,7 @@ const LayoutHelmet = ({
|
|
|
174
174
|
<link rel="shortcut icon" href={favHref} type="image/x-icon" />
|
|
175
175
|
<link rel="canonical" href={`${CANONICAL_URL}/${url_add}`} />
|
|
176
176
|
<link
|
|
177
|
-
rel="
|
|
177
|
+
rel="preload"
|
|
178
178
|
href={`https://files.sfchronicle.com/brand-styles/${styleSheetID}.css`}
|
|
179
179
|
/>
|
|
180
180
|
|