Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var swpClickTracking = false; var swp_nonce = "71db6deea7";
- function parentIsEvil() { var html = null; try { var doc = top.location.pathname; } catch(err){ }; if(typeof doc === "undefined") { return true } else { return false }; }; if (parentIsEvil()) { top.location = self.location.href; };var url = "https://www.coffeeloversmag.com/";if(url.indexOf("stfi.re") != -1) { var canonical = ""; var links = document.getElementsByTagName("link"); for (var i = 0; i < links.length; i ++) { if (links[i].getAttribute("rel") === "canonical") { canonical = links[i].getAttribute("href")}}; canonical = canonical.replace("?sfr=1", "");top.location = canonical; console.log(canonical);}; var within_timelimit;
- swp_admin_ajax = 'https://www.coffeeloversmag.com/wp-admin/admin-ajax.php';
- var swp_buttons_exist = !!document.getElementsByClassName( 'nc_socialPanel' );
- if ( swp_buttons_exist ) {
- jQuery( document ).ready( function() {
- var swp_check_for_js = setInterval( function() {
- if( 'undefined' !== typeof socialWarfarePlugin) {
- clearInterval(swp_check_for_js);
- var swp_cache_data = {
- 'action': 'swp_cache_trigger',
- 'post_id': 71,
- 'timestamp': 1511502254 };
- // if( !swp_cache_data.timestamp ){ // error handling}
- console.log( "Server Timestamp is " + swp_cache_data.timestamp );
- var browser_date = Date.now();
- if( !browser_date )
- browser_date = new Date().getTime();
- browser_date = Math.floor( browser_date / 1000 );
- console.log( "Browser Timestamp is " + browser_date );
- var elapsed_time = ( browser_date - swp_cache_data.timestamp );
- if( elapsed_time > 60 ){
- console.log( "Elapsed time since server timestamp is greater than 60 seconds -- " + elapsed_time + "seconds" );
- within_timelimit = false;
- } else {
- console.log( "Elapsed time since server timestamp is less than 60 seconds -- " + elapsed_time + "seconds" );
- within_timelimit = true;
- }
- if( within_timelimit === true ){
- jQuery.post( swp_admin_ajax, swp_cache_data, function( response ) {
- console.log(response);
- });
- socialWarfarePlugin.fetchShares();
- }
- }
- } , 250 );
- });
- swp_post_id='71';
- swp_post_url='https://www.coffeeloversmag.com/';
- swp_post_recovery_url = '';
- // socialWarfarePlugin.fetchShares();
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement