sfc-utils 1.4.84 → 1.4.86

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.
@@ -100,10 +100,11 @@ const LayoutHelmet = ({
100
100
  "https://www.seattlepi.com/sites/seattlepi/apple-touch-icon-196x196.png";
101
101
  } else if (MARKET_KEY === "SFC") {
102
102
  favHref =
103
- "https://www.sfchronicle.com/sites/premiumsfgate/apple-touch-icon-196x196.png";
103
+ "https://www.sfchronicle.com/sites/premiumsfgate/apple-touch-icon-152x152.png";
104
104
  } else if (MARKET_KEY === "Houston") {
105
+ // NOTE: HC is cursed with a tiny favicon until product can fix the higher res one
105
106
  favHref =
106
- "https://www.houstonchronicle.com/sites/premiumchron/apple-touch-icon-196x196.png";
107
+ "https://www.houstonchronicle.com/sites/premiumchron/favicon-32x32.png";
107
108
  } else if (MARKET_KEY === "SanAntonio") {
108
109
  // NOTE: EN is cursed with a tiny favicon until product can fix the higher res one
109
110
  favHref = "https://www.expressnews.com/sites/premiummysa/favicon.ico";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.4.84",
3
+ "version": "1.4.86",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",
package/personalize.js ADDED
@@ -0,0 +1,35 @@
1
+ //
2
+ // NOTE: This will only work on a deployed URL!
3
+ const getProfileProperty = (property) => {
4
+ if (window) {
5
+ if (window.blueConicClient) {
6
+ const profile = window.blueConicClient.profile.getProfile();
7
+ const properties = [property];
8
+ profile.loadValues(properties, this, function () {
9
+ var value = profile.getValue(property);
10
+ // Return a valid result or null
11
+ value = value || null;
12
+ return value;
13
+ });
14
+ } else {
15
+ return "Personalize: No BlueConic client found";
16
+ }
17
+ }
18
+ };
19
+
20
+ const setProfileProperty = (property, value) => {
21
+ if (window) {
22
+ if (window.blueConicClient) {
23
+ const profile = window.blueConicClient.profile.getProfile();
24
+ const properties = [property];
25
+ profile.loadValues(properties, this, function () {
26
+ profile.setValue(property, value);
27
+ return true;
28
+ });
29
+ } else {
30
+ return "Personalize: No BlueConic client found";
31
+ }
32
+ }
33
+ };
34
+
35
+ module.exports = { getProfileProperty, setProfileProperty };