fork download
  1. <script type="text/javascript" src="http://w...content-available-to-author-only...s.com/js/common/notification/nytdgrowl.js">
  2.  
  3.  
  4. Event.observe(window, "load", function(e) {
  5.  
  6. var nytm = (/nyt-m=([^;]+)/).test(unescape(document.cookie)) ? RegExp.$1 : null;
  7.  
  8. if (!nytm) return;
  9.  
  10.  
  11. var count = (/v=i\.(\d+)/).test(nytm) ? parseInt(RegExp.$1) : 0;
  12. var limit = (/t=i\.(\d+)/).test(nytm) ? parseInt(RegExp.$1) : 0;
  13. var remainder = limit - count;
  14.  
  15. var articleRemainingMessage = (remainder > 0) ? 'You have <b>'+remainder+' of '+limit+' free articles remaining </b><br> this month' :
  16. 'This is <b class="alert">your last free article</b> this month';
  17.  
  18. var meterMessage = '<p>' + articleRemainingMessage + '</p>\
  19. <p><a href="%%CLICKGOTO%%=%%CLICKTHRU1%%"><u>Try unlimited access for just 99&cent;(TEST 15)</u><img src="%%IMAGEURL%%/1x1.gif" alt="" /></a></p>'; <img src="%%IMAGEURL%%/1x1.gif" alt="" />
  20.  
  21. if (document.body){
  22. var value = document.body.style.backgroundColor;
  23. if (!value && document.defaultView) {
  24. var css = document.defaultView.getComputedStyle(document.body, null);
  25. value = css ? css['backgroundColor'] : null;
  26. }
  27. else if (!value && document.body.currentStyle) {
  28. value = document.body.currentStyle.backgroundColor;
  29. }
  30. if (value == 'rgb(26, 26, 26)' || value.toLowerCase() == '#1a1a1a') {
  31. // dark page
  32. var bgStyle = 'dark'
  33. }
  34. }
  35.  
  36. var msgObj = {
  37. header: '',
  38. message: meterMessage
  39. };
  40.  
  41. var params = {
  42. predefinedGrowlStyle: bgStyle || 'light',
  43. growlStyle: {
  44. sticky: true
  45. },
  46. containerStyle: {
  47. "position": "fixed",
  48. "zIndex": 2147483646,
  49. "left": "20px",
  50. "bottom": "0",
  51. "margin": "0"
  52. }
  53. };
  54.  
  55. new NYTD.MeteredGrowl().growl(msgObj, params);
  56.  
  57. });
  58. </script>
  59.  
Runtime error #stdin #stdout 0.28s 213696KB
stdin
Standard input is empty
stdout
Standard output is empty