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
- // Add vars
65
- if (window.hnpbid) {
66
- console.log("hnpbid exists");
67
- window.hnpbid = window.hnpbid || {};
68
- window.hnpbid.cmd = window.hnpbid.cmd || [];
69
- window.hnpbid.cmd.push(() => {
70
- window.hnpbid.setTargeting(
71
- "is_testing",
72
- currentEnv === "production" ? "no" : "yes"
73
- ); // Set to "no" for production
74
- window.hnpbid.setTargeting("is_home", "no"); // Set to "yes" on the homepage
75
- window.hnpbid.setTargeting("post_id", `${fullURL}`);
76
- window.hnpbid.setTargeting("category", category || "news");
77
- // init
78
- window.hnpbid.layout();
79
- });
80
- } else {
81
- console.log("hnpbid does not exist");
82
- // If global var was not defined, start Juice
83
- let script = document.createElement("script");
84
- script.type = "text/javascript";
85
- script.id = "adPositionManagerScriptTag";
86
- script.src = "https://aps.hearstnp.com/Scripts/loadAds.js";
87
- document.body.appendChild(script);
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="stylesheet"
177
+ rel="preload"
178
178
  href={`https://files.sfchronicle.com/brand-styles/${styleSheetID}.css`}
179
179
  />
180
180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.4.147",
3
+ "version": "1.4.149",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",