How to Change an Apple Watch Band and Stylize Your Smartwatch | Digital Trends /g,">").replace(/"/g,""").replace(/'/g,"&apos;")},window.dtGetUrlParameter=function(e,t){name=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+name+"=([^&#]*)",o=new RegExp(n).exec(e);return null==o?"":decodeURIComponent(o[1].replace(/\+/g," "))},function(e,t){var n=null,o=!1,r=new URL(window.location.href),i=encodeURIComponent("dt_utm"),a=new RegExp("(?:^|; )".concat(i,"=([^;]*)")).exec(e.cookie),c=a?a[1]:null;if(c){n=JSON.parse(c);var s=r.searchParams.get("utm_source");s&&n.utm_source!==s&&(o=!0)}else r.searchParams.get("utm_source")&&(o=!0);var l={utm_source:r.searchParams.get("utm_source")||"",utm_medium:r.searchParams.get("utm_medium")||"",utm_term:r.searchParams.get("utm_term")||"",utm_content:r.searchParams.get("utm_content")||"",utm_campaign:r.searchParams.get("utm_campaign")||"",utm_changed:o};if(l.utm_source||l.utm_medium||l.utm_term||l.utm_content||l.utm_campaign){var u=JSON.stringify(l);e.cookie="dt_utm=".concat(u,"; expires=0; path=/")}else n&&(n.utm_changed=!1,l=n);t.addCallback(function(t,n){"session_start"===t&&"1"===n&&!1===l.utm_changed&&(e.cookie="dt_utm=; expires=Thu, 01 Jan 1970 00:00:001 GMT")}),t.set({utm:l})}(document,window.DTData),function(e,t){var n,o,r,i,a,c,s,l=function(e){var t;try{var n="__storage_test__";return(t=window[e]).setItem(n,n),t.removeItem(n),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}},u=function(e){var t=Date.now(),n=Math.floor(1048576*(1+Math.random())).toString(16),o=Math.floor(1048576*(1+Math.random())).toString(16),r="".concat(t,"-").concat(n,"-").concat(o);return e&&(r="".concat(e,"-").concat(r)),r},f=function(t){for(var n="".concat(t,"="),o=decodeURIComponent(e.cookie).split(";"),r=0;r0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"log";if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]||a){var o=["warning","error"].indexOf(e)>-1?e:"log",i="%cDTPersonas:";i+=["warning","error"].indexOf(o)>-1?" ".concat(o.toUpperCase(),":"):"";var c,s,u=[i+=r&&"string"==typeof r?" ".concat(r):""];n.logStyles[o]&&u.push(n.logStyles[o]),void 0!==t&&u.push(t),"function"==typeof window.console[o]?(c=window.console)[o].apply(c,u):(s=window.console).log.apply(s,u)}},f=function(r){return"string"==typeof r?r.replace(/[^A-Za-z0-9-_]/gm,""):""},d=function(){if(e)return u("Data not saved (disabled)."),!1;try{if(s("localStorage")){var r={actions:i.actions,version:i.version};return window.localStorage.setItem(n.storageKey,JSON.stringify(r)),u("Data saved.",r),!0}}catch(r){u("Save data failed.",r,"error",!0)}return u("Data not saved."),!1},w=function(){if(e)return u("Data not loaded (disabled)."),!1;try{if(s("localStorage")){var r=JSON.parse(window.localStorage.getItem(n.storageKey));if(r){if(1===r.version)return i.actions=function(r,t){if(!r||"object"!==_typeof(r))throw new Error("Missing or bad actions.");if(t&&"number"!=typeof t)throw new Error("Bad pruneTime.");var e={};return Object.keys(r).forEach(function(n){if(Array.isArray(r[n])){var o=r[n].filter(function(r){return"number"==typeof r&&!(t&&Date.now()/1e3-r>t)}),i=r[n].length-o.length;if(i&&u("Pruned ".concat(i," old actions from ").concat(n,".")),o.length){var a=f(n);a&&(e[a]=o)}}}),e}(r.actions||{},n.pruneTime),u("Data Loaded.",r),!0;u("Saved data is wrong api version.")}}}catch(r){u("Load data failed.",r,"error",!0)}return u("Data not loaded."),!1},y={storageAvailable:s,init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s={};e&&(s.traits=[],s.actions=[]),function(r,t){for(var e=Object(r),n=1;nn?i++:e&&tn&&i++}),i}(i.actions,r,t,e)}catch(r){return u("Caught exception on count, returning default.",r,"error",!0),0}},get:function(){return i.key},is:function(r){var t=function(r){if(!r||"string"!=typeof r)throw new Error("Missing or bad query.");var t=r.replace(/\s/gm,""),e=t.match(/^[=!<>][=]?/),n=e?e[0]:"==",o=f(t);if(!o)throw new Error("No key found in query.");return{key:o,operator:n}}(r);return i.key&&o[i.key]&&o[t.key]?function(r,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"==",n=Number(r),o=Number(t);if("number"!=typeof n||"number"!=typeof o)throw new Error("I specifically said numbers. NUMBERS!!!");switch(e){case"<":return n<=":return n<=o;case">":return n>o;case">=":return n>=o;case"!=":return n!==o;case"==":return n===o;default:throw new Error("Unsupported operator.")}}(o[i.key].rank,o[t.key].rank,t.operator):null},getTraits:function(){return i.traits},hasTrait:function(r){return-1!==i.traits.indexOf(r)},isBot:function(){return t},isDisabled:function(){return e}};window.DTPersonas=y}(),function(r){var t=window.DTPersonas,e=-1!==window.location.search.search(/dt_?debug=1/)||t.storageAvailable("localStorage")&&window.localStorage.getItem("dt_debug");t.init({debug:e,personas:[{key:"bot",rank:2,condition:function(){return t.isBot()}},{key:"disabled",rank:2,condition:function(){return t.isDisabled()}},{key:"staff",rank:2,condition:function(){return t.hasTrait("staff-visitor")}},{key:"power-user",rank:6,condition:function(){return t.hasTrait("direct-visitor")&&t.hasTrait("frequent-visitor")&&t.hasTrait("engaged")}},{key:"subscriber",rank:5,condition:function(){return!1}},{key:"user",rank:4,condition:function(){return t.hasTrait("direct-visitor")}},{key:"prospect",rank:3,condition:function(){return t.hasTrait("session-visitor")&&t.hasTrait("referred")}},{key:"acquired",rank:1,condition:function(){return t.hasTrait("ua-referred")}},{key:"referred",rank:2,condition:function(){return t.hasTrait("referred")}},{key:"none",rank:2,condition:function(){return!0}}],traits:[{key:"direct-visitor",condition:function(){return!!t.count("direct-enter",604800)}},{key:"session-visitor",condition:function(){return!!t.count("session-view",1800)}},{key:"recent-visitor",condition:function(){return!!t.count("unique-view",172800,10800)}},{key:"frequent-visitor",condition:function(){return t.count("unique-view",1209600,10800)>10}},{key:"staff-visitor",condition:function(){return!!t.count("staff-view")}},{key:"ua-referred",condition:function(){return!!t.count("ua-view",86400)}},{key:"fb-referred",condition:function(){return!!t.count("facebook-enter",86400)}},{key:"search-referred",condition:function(){return!!t.count("search-enter",86400)}},{key:"referred",condition:function(){return!!t.count("referral",86400)}},{key:"engaged",condition:function(){return t.count("engage",1209600)>3||t.count("session-view")/Math.max(t.count("unique-view"),1)>=3}}],actions:[function(r){-1===document.referrer.search(/https?:\/\/(?:[a-z0-9]+\.)?www\.digitaltrends\.com\//i)?r("unique-view"):r("session-view")},function(r){-1===window.location.search.search(/utm_[^=]+?=/i)&&(document.referrer||window.location.pathname&&-1===window.location.pathname.search(/^\/[^\/]*?\/?$/)||r("direct-enter"))},function(r){-1!==document.referrer.search(/https?:\/\/www\.google\.com\//i)?(r("search-enter"),r("referral")):-1!==document.referrer.search(/https?:\/\/www\.facebook\.com\//i)?(r("facebook-enter"),r("referral")):-1!==document.referrer.search(/https?:\/\/www\.twitter\.com\//i)?(r("twitter-enter"),r("referral")):-1!==document.referrer.search(/https?:\/\/www\.reddit\.com\//i)&&(r("reddit-enter"),r("referral"))},function(t){var e=r.get("utm");if(e)for(var n=[{k:"medium",v:"cpc"}],o=n.length;o--;)if(e["utm_".concat(n[o].k)]===n[o].v){t("ua-view");break}},function(r){window.DTEvent.on("dt:share:shared",function(t){r("engage"),r("share"),"string"==typeof t&&-1!==["twitter","facebook","reddit","pinterest","linkedin"].indexOf(t)&&r("".concat(t,"-share"))})},function(r){window.DTEvent.on("dt:dynamic_components:user_data_available",function(t){((t||{}).capabilities||{}).edit_posts&&r("staff-view")})}]})}(DTData); "use strict";!function(e,c){var n=null,o=!1,t=encodeURIComponent("dt_kclid"),i=new RegExp("(?:^|; )".concat(t,"=([^;]*)")).exec(e.cookie),a=i?i[1]:null;a&&(n=a);var d=new URL(window.location.href).searchParams.get("k_clickid")||"";d?(e.cookie="dt_kclid=".concat(d,"; expires=0; path=/"),o=!0):n&&(d=n),"1"===c.get("session_start")&&!1===o&&(e.cookie="dt_kclid=; expires=Thu, 01 Jan 1970 00:00:001 GMT",d=null),c.set({kclid:d})}(document,window.DTData);
By	Carlos Vega	@carlosmcse — Posted on	July 11, 2017 6:00AM PST 07.11.17 - 6:00AM PST
How to Change an Apple Watch Band and Stylize Your Smartwatch | Digital Trends /g,">").replace(/"/g,""").replace(/'/g,"&apos;")},window.dtGetUrlParameter=function(e,t){name=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+name+"=([^&#]*)",o=new RegExp(n).exec(e);return null==o?"":decodeURIComponent(o[1].replace(/\+/g," "))},function(e,t){var n=null,o=!1,r=new URL(window.location.href),i=encodeURIComponent("dt_utm"),a=new RegExp("(?:^|; )".concat(i,"=([^;]*)")).exec(e.cookie),c=a?a[1]:null;if(c){n=JSON.parse(c);var s=r.searchParams.get("utm_source");s&&n.utm_source!==s&&(o=!0)}else r.searchParams.get("utm_source")&&(o=!0);var l={utm_source:r.searchParams.get("utm_source")||"",utm_medium:r.searchParams.get("utm_medium")||"",utm_term:r.searchParams.get("utm_term")||"",utm_content:r.searchParams.get("utm_content")||"",utm_campaign:r.searchParams.get("utm_campaign")||"",utm_changed:o};if(l.utm_source||l.utm_medium||l.utm_term||l.utm_content||l.utm_campaign){var u=JSON.stringify(l);e.cookie="dt_utm=".concat(u,"; expires=0; path=/")}else n&&(n.utm_changed=!1,l=n);t.addCallback(function(t,n){"session_start"===t&&"1"===n&&!1===l.utm_changed&&(e.cookie="dt_utm=; expires=Thu, 01 Jan 1970 00:00:001 GMT")}),t.set({utm:l})}(document,window.DTData),function(e,t){var n,o,r,i,a,c,s,l=function(e){var t;try{var n="__storage_test__";return(t=window[e]).setItem(n,n),t.removeItem(n),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}},u=function(e){var t=Date.now(),n=Math.floor(1048576*(1+Math.random())).toString(16),o=Math.floor(1048576*(1+Math.random())).toString(16),r="".concat(t,"-").concat(n,"-").concat(o);return e&&(r="".concat(e,"-").concat(r)),r},f=function(t){for(var n="".concat(t,"="),o=decodeURIComponent(e.cookie).split(";"),r=0;r0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"log";if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]||a){var o=["warning","error"].indexOf(e)>-1?e:"log",i="%cDTPersonas:";i+=["warning","error"].indexOf(o)>-1?" ".concat(o.toUpperCase(),":"):"";var c,s,u=[i+=r&&"string"==typeof r?" ".concat(r):""];n.logStyles[o]&&u.push(n.logStyles[o]),void 0!==t&&u.push(t),"function"==typeof window.console[o]?(c=window.console)[o].apply(c,u):(s=window.console).log.apply(s,u)}},f=function(r){return"string"==typeof r?r.replace(/[^A-Za-z0-9-_]/gm,""):""},d=function(){if(e)return u("Data not saved (disabled)."),!1;try{if(s("localStorage")){var r={actions:i.actions,version:i.version};return window.localStorage.setItem(n.storageKey,JSON.stringify(r)),u("Data saved.",r),!0}}catch(r){u("Save data failed.",r,"error",!0)}return u("Data not saved."),!1},w=function(){if(e)return u("Data not loaded (disabled)."),!1;try{if(s("localStorage")){var r=JSON.parse(window.localStorage.getItem(n.storageKey));if(r){if(1===r.version)return i.actions=function(r,t){if(!r||"object"!==_typeof(r))throw new Error("Missing or bad actions.");if(t&&"number"!=typeof t)throw new Error("Bad pruneTime.");var e={};return Object.keys(r).forEach(function(n){if(Array.isArray(r[n])){var o=r[n].filter(function(r){return"number"==typeof r&&!(t&&Date.now()/1e3-r>t)}),i=r[n].length-o.length;if(i&&u("Pruned ".concat(i," old actions from ").concat(n,".")),o.length){var a=f(n);a&&(e[a]=o)}}}),e}(r.actions||{},n.pruneTime),u("Data Loaded.",r),!0;u("Saved data is wrong api version.")}}}catch(r){u("Load data failed.",r,"error",!0)}return u("Data not loaded."),!1},y={storageAvailable:s,init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s={};e&&(s.traits=[],s.actions=[]),function(r,t){for(var e=Object(r),n=1;nn?i++:e&&tn&&i++}),i}(i.actions,r,t,e)}catch(r){return u("Caught exception on count, returning default.",r,"error",!0),0}},get:function(){return i.key},is:function(r){var t=function(r){if(!r||"string"!=typeof r)throw new Error("Missing or bad query.");var t=r.replace(/\s/gm,""),e=t.match(/^[=!<>][=]?/),n=e?e[0]:"==",o=f(t);if(!o)throw new Error("No key found in query.");return{key:o,operator:n}}(r);return i.key&&o[i.key]&&o[t.key]?function(r,t){var e=arg
uments.length>2&&void 0!==arguments[2]?arguments[2]:"==",n=Number(r),o=Number(t);if("number"!=typeof n||"number"!=typeof o)throw new Error("I specifically said numbers. NUMBERS!!!");switch(e){case"<":return n<=":return n<=o;case">":return n>o;case">=":return n>=o;case"!=":return n!==o;case"==":return n===o;default:throw new Error("Unsupported operator.")}}(o[i.key].rank,o[t.key].rank,t.operator):null},getTraits:function(){return i.traits},hasTrait:function(r){return-1!==i.traits.indexOf(r)},isBot:function(){return t},isDisabled:function(){return e}};window.DTPersonas=y}(),function(r){var t=window.DTPersonas,e=-1!==window.location.search.search(/dt_?debug=1/)||t.storageAvailable("localStorage")&&window.localStorage.getItem("dt_debug");t.init({debug:e,personas:[{key:"bot",rank:2,condition:function(){return t.isBot()}},{key:"disabled",rank:2,condition:function(){return t.isDisabled()}},{key:"staff",rank:2,condition:function(){return t.hasTrait("staff-visitor")}},{key:"power-user",rank:6,condition:function(){return t.hasTrait("direct-visitor")&&t.hasTrait("frequent-visitor")&&t.hasTrait("engaged")}},{key:"subscriber",rank:5,condition:function(){return!1}},{key:"user",rank:4,condition:function(){return t.hasTrait("direct-visitor")}},{key:"prospect",rank:3,condition:function(){return t.hasTrait("session-visitor")&&t.hasTrait("referred")}},{key:"acquired",rank:1,condition:function(){return t.hasTrait("ua-referred")}},{key:"referred",rank:2,condition:function(){return t.hasTrait("referred")}},{key:"none",rank:2,condition:function(){return!0}}],traits:[{key:"direct-visitor",condition:function(){return!!t.count("direct-enter",604800)}},{key:"session-visitor",condition:function(){return!!t.count("session-view",1800)}},{key:"recent-visitor",condition:function(){return!!t.count("unique-view",172800,10800)}},{key:"frequent-visitor",condition:function(){return t.count("unique-view",1209600,10800)>10}},{key:"staff-visitor",condition:function(){return!!t.count("staff-view")}},{key:"ua-referred",condition:function(){return!!t.count("ua-view",86400)}},{key:"fb-referred",condition:function(){return!!t.count("facebook-enter",86400)}},{key:"search-referred",condition:function(){return!!t.count("search-enter",86400)}},{key:"referred",condition:function(){return!!t.count("referral",86400)}},{key:"engaged",condition:function(){return t.count("engage",1209600)>3||t.count("session-view")/Math.max(t.count("unique-view"),1)>=3}}],actions:[function(r){-1===document.referrer.search(/https?:\/\/(?:[a-z0-9]+\.)?www\.digitaltrends\.com\//i)?r("unique-view"):r("session-view")},function(r){-1===window.location.search.search(/utm_[^=]+?=/i)&&(document.referrer||window.location.pathname&&-1===window.location.pathname.search(/^\/[^\/]*?\/?$/)||r("direct-enter"))},function(r){-1!==document.referrer.search(/https?:\/\/www\.google\.com\//i)?(r("search-enter"),r("referral")):-1!==document.referrer.search(/https?:\/\/www\.facebook\.com\//i)?(r("facebook-enter"),r("referral")):-1!==document.referrer.search(/https?:\/\/www\.twitter\.com\//i)?(r("twitter-enter"),r("referral")):-1!==document.referrer.search(/https?:\/\/www\.reddit\.com\//i)&&(r("reddit-enter"),r("referral"))},function(t){var e=r.get("utm");if(e)for(var n=[{k:"medium",v:"cpc"}],o=n.length;o--;)if(e["utm_".concat(n[o].k)]===n[o].v){t("ua-view");break}},function(r){window.DTEvent.on("dt:share:shared",function(t){r("engage"),r("share"),"string"==typeof t&&-1!==["twitter","facebook","reddit","pinterest","linkedin"].indexOf(t)&&r("".concat(t,"-share"))})},function(r){window.DTEvent.on("dt:dynamic_components:user_data_available",function(t){((t||{}).capabilities||{}).edit_posts&&r("staff-view")})}]})}(DTData); "use strict";!function(e,c){var n=null,o=!1,t=encodeURIComponent("dt_kclid"),i=new RegExp("(?:^|; )".concat(t,"=([^;]*)")).exec(e.cookie),a=i?i[1]:null;a&&(n=a);var d=new URL(window.location.href).searchParams.get("k_clickid")||"";d?(e.cookie="dt_kclid=".concat(d,"; expires=0; path=/"),o=!0):n&&(d=n),"1"===c.get("session_start")&&!1===o&&(e.cookie="dt_kclid=; expires=Thu, 01 Jan 1970 00:00:001 GMT",d=null),c.set({kclid:d})}(document,window.DTData);
By	Carlos Vega	@carlosmcse — Posted on	July 11, 2017 6:00AM PST 07.11.17 - 6:00AM PST