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