1. javascript: (function () {
    2. function c() {
    3. var e = document.createElement("link");
    4. e.setAttribute("type", "text/css");
    5. e.setAttribute("rel", "stylesheet");
    6. e.setAttribute("href", f);
    7. e.setAttribute("class", l);
    8. document.body.appendChild(e)
    9. }
    10. function h() {
    11. var e = document.getElementsByClassName(l);
    12. for (var t = 0; t < e.length; t++) {
    13. document.body.removeChild(e[t])
    14. }
    15. }
    16. function p() {
    17. var e = document.createElement("div");
    18. e.setAttribute("class", a);
    19. document.body.appendChild(e);
    20. setTimeout(function () {
    21. document.body.removeChild(e)
    22. }, 100)
    23. }
    24. function d(e) {
    25. return {
    26. height: e.offsetHeight,
    27. width: e.offsetWidth
    28. }
    29. }
    30. function v(i) {
    31. var s = d(i);
    32. return s.height > e && s.height < n && s.width > t && s.width < r
    33. }
    34. function m(e) {
    35. var t = e;
    36. var n = 0;
    37. while ( !! t) {
    38. n += t.offsetTop;
    39. t = t.offsetParent
    40. }
    41. return n
    42. }
    43. function g() {
    44. var e = document.documentElement;
    45. if ( !! window.innerWidth) {
    46. return window.innerHeight
    47. } else if (e && !isNaN(e.clientHeight)) {
    48. return e.clientHeight
    49. }
    50. return 0
    51. }
    52. function y() {
    53. if (window.pageYOffset) {
    54. return window.pageYOffset
    55. }
    56. return Math.max(document.documentElement.scrollTop, document.body.scrollTop)
    57. }
    58. function E(e) {
    59. var t = m(e);
    60. return t >= w && t <= b + w
    61. }
    62. function S() {
    63. var e = document.createElement("audio");
    64. e.setAttribute("class", l);
    65. e.src = i;
    66. e.loop = false;
    67. e.addEventListener("canplay", function () {
    68. setTimeout(function () {
    69. x(k)
    70. }, 500);
    71. setTimeout(function () {
    72. N();
    73. p();
    74. for (var e = 0; e < O.length; e++) {
    75. T(O[e])
    76. }
    77. }, 15500)
    78. }, true);
    79. e.addEventListener("ended", function () {
    80. N();
    81. h()
    82. }, true);
    83. e.innerHTML = " <p>If you are reading this, it is because your browser does not support the audio element. We recommend that you get a new browser.</p> <p>";
    84. document.body.appendChild(e);
    85. e.play()
    86. }
    87. function x(e) {
    88. e.className += " " + s + " " + o
    89. }
    90. function T(e) {
    91. e.className += " " + s + " " + u[Math.floor(Math.random() * u.length)]
    92. }
    93. function N() {
    94. var e = document.getElementsByClassName(s);
    95. var t = new RegExp("\\b" + s + "\\b");
    96. for (var n = 0; n < e.length;) {
    97. e[n].className = e[n].className.replace(t, "")
    98. }
    99. }
    100. var e = 30;
    101. var t = 30;
    102. var n = 350;
    103. var r = 350;
    104. var i = "//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake.mp3";
    105. var s = "mw-harlem_shake_me";
    106. var o = "im_first";
    107. var u = ["im_drunk", "im_baked", "im_trippin", "im_blown"];
    108. var a = "mw-strobe_light";
    109. var f = "//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake-style.css";
    110. var l = "mw_added_css";
    111. var b = g();
    112. var w = y();
    113. var C = document.getElementsByTagName("*");
    114. var k = null;
    115. for (var L = 0; L < C.length; L++) {
    116. var A = C[L];
    117. if (v(A)) {
    118. if (E(A)) {
    119. k = A;
    120. break
    121. }
    122. }
    123. }
    124. if (A === null) {
    125. console.warn("Could not find a node of the right size. Please try a different page.");
    126. return
    127. }
    128. c();
    129. S();
    130. var O = [];
    131. for (var L = 0; L < C.length; L++) {
    132. var A = C[L];
    133. if (v(A)) {
    134. O.push(A)
    135. }
    136. }
    137. })()