Re:

From disqus.com, 2 Months ago, written in JavaScript, viewed 3 times. This paste is a reply to Re: index.js from disqus.com - view diff
URL https://pastebin.freepbx.org/view/0e8804bd Embed
Download Paste or View Raw
  1. <script>
  2.   window.DISQUS.jester.pv({
  3.     product: 'dotcom',
  4.     zone: 'welcome',
  5.     section: 'blogpost',
  6.   })
  7. </script>
  8.  
  9. <script>
  10.   function getRequestParameter(name){
  11.     if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))
  12.       return decodeURIComponent(name[1]);
  13.   }
  14.  
  15.   /**
  16.    *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
  17.    *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
  18.    */
  19.  
  20.   window.disqus_config = (function () {
  21.     var hasRun = false;
  22.     return function () {
  23.  
  24.       var campaignID = getRequestParameter('cid');
  25.       if (campaignID) {
  26.         this.callbacks.onReady = [
  27.           function () {
  28.             if (hasRun)
  29.               return;
  30.             hasRun = true;
  31.             var _config = window.disqus_config;
  32.             window.disqus_config = function () {
  33.               if (_config) _config.call(this);
  34.               if (!(this.server_side && this.server_side.top_placement_url && this.server_side.top_placement_url.indexOf("adsnative") > -1)) return;
  35.               this.server_side.top_placement_url += '&adsnative_preview=1&cid=' + campaignID;  // enable AdsNative logging to browser console and force an AdsNative campaign
  36.             };
  37.             DISQUS.reset({ reload: true });
  38.           }
  39.         ];
  40.       }
  41.     };
  42.   }());
  43.  
  44.    var disqus_config = function() {
  45.        
  46.         this.page.url = 'https://blog.disqus.com/standalone-recommendations-beta-is-now-available';  // Replace PAGE_URL with your page's canonical URL variable
  47.         this.page.identifier = '44098624561'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
  48.  
  49.         // https://blog.disqus.com/how-to-track-disqus-activity-in-google-analytics
  50.         this.callbacks.onNewComment = [function(comment) {
  51.               ga('send', {
  52.                 'hitType': 'event',            // Required.
  53.                 'eventCategory': 'Comments',   // Required.
  54.                 'eventAction': 'New Comment',  // Required.
  55.                 'eventLabel': 'New Comment'
  56.             });
  57.         }];
  58.         this.callbacks.onPaginate = [function(comment) {
  59.               ga('send', {
  60.                 'hitType': 'event',            // Required.
  61.                 'eventCategory': 'Comments',   // Required.
  62.                 'eventAction': 'Load More Comments',  // Required.
  63.                 'eventLabel': 'Load More Comments'
  64.             });
  65.         }];
  66.  
  67.   };
  68.  
  69.   (function() {  // DON'T EDIT BELOW THIS LINE
  70.     var d = document, s = d.createElement('script');
  71.    
  72.     s.src = '//disqus.disqus.com/embed.js';
  73.    
  74.     s.setAttribute('data-timestamp', +new Date());
  75.     (d.head || d.body).appendChild(s);
  76.   })();
  77. </script>
  78. <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
  79.  
  80.  
  81.  

Reply to "Re:"

Here you can reply to the paste above