Guest User

Untitled

a guest
Apr 15th, 2016
1,512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.89 KB | None | 0 0
  1. (function () {
  2. window._r3z = window._r3z || {};
  3. _r3z.cid = "AAB/www.computerworlduk.com";
  4. _r3z.jq = window.jQuery ? jQuery : 0;
  5. if (!_r3z.jq)
  6. return;
  7. function e(e) {
  8. e = e || _r3z.pub.pix.gnc;
  9. var r = e;
  10. for (var t = 0; t < r.length; t++) {
  11. _r3z.pub.pxi.push(new Image);
  12. try {
  13. _r3z.pub.pxi[_r3z.pub.pxi.length - 1].src = decodeURIComponent(r[t])
  14. } catch (n) {
  15. console.log("Bad URL: " + src)
  16. }
  17. }
  18. }
  19. function r(e, r, t, n) {
  20. var i,
  21. a;
  22. a = t ? "; expires=" + t.toUTCString() : "";
  23. i = "; path=" + (n || "/");
  24. document.cookie = e + "=" + r + a + i
  25. }
  26. function t(e) {
  27. var r = e + "=";
  28. var t = document.cookie.split(";");
  29. for (var n = 0; n < t.length; n++) {
  30. var i = t[n];
  31. while (i.charAt(0) == " ")
  32. i = i.substring(1);
  33. if (i.indexOf(r) == 0)
  34. return i.substring(r.length, i.length)
  35. }
  36. return ""
  37. }
  38. function n() {
  39. if (navigator.userAgent.indexOf("Googlebot") >= 0 || navigator.userAgent.indexOf("bingbot") >= 0) {
  40. return false
  41. }
  42. return true
  43. }
  44. function i(e) {
  45. return _r3z.jq.trim(e.replace(/[^\w']/gi, " ")).split(/\s+/).length
  46. }
  47. function a(e) {
  48. _r3z.jq(e).contents().filter(function () {
  49. return this.nodeType == 3
  50. }).wrap("<p></p>").end().filter("br").remove()
  51. }
  52. function o(e) {
  53. for (var r = 0; r < e.length; r++) {
  54. if (_r3z.jq(e[r]).html().search(/<br>\s*<br>/) == -1)
  55. continue;
  56. _r3z.jq(e[r]).after("<p>" + _r3z.jq(e[r]).html().replace(/<br>\s*<br>/g, "</p><p>") + "</p>");
  57. _r3z.jq(e[r]).remove()
  58. }
  59. }
  60. function s(e) {
  61. var r = document.head || document.getElementsByTagName("head")[0],
  62. t = document.createElement("style"),
  63. n;
  64. t.type = "text/css";
  65. n = e.replace(/}/g, "}\n");
  66. n = n.replace(/\[CDN\]/g, _r3z.cdn);
  67. if (t.styleSheet)
  68. t.styleSheet.cssText = n;
  69. else
  70. t.appendChild(document.createTextNode(n));
  71. r.appendChild(t)
  72. }
  73. function d(e, r) {
  74. function t(e, r) {
  75. var t = [function (e, r) {
  76. var t = r % 2 == 0 ? 2 : 1;
  77. return e < r / 2 ? r - 2 * e - t : 2 * e + (t - 1) - r
  78. }, function (e, r) {
  79. var t = r % 2 == 0 ? 1 : 0;
  80. return e % 2 == 0 ? (r - t - 1 - e) / 2 : (r - t + e) / 2
  81. }
  82. ];
  83. var n,
  84. i = e.length;
  85. var a = new Array(i);
  86. for (n = 0; n < i; n++)
  87. a[t[r](n, i)] = e[n];
  88. return a.join("")
  89. }
  90. if (e.nodeType == 3) {
  91. var n = e.nodeValue;
  92. if (r) {
  93. if (n.substring(0, 2) == "__" && n.substring(n.length - 2) == "__")
  94. e.nodeValue = t(n.substring(2, n.length - 2), r)
  95. } else
  96. e.nodeValue = "__" + t(n, r) + "__"
  97. } else {
  98. for (var i = 0; i < e.childNodes.length; i++)
  99. d(e.childNodes[i], r)
  100. }
  101. }
  102. function l() {
  103. var e = _r3z.jq("#r3z-inst-bot"),
  104. r = _r3z.jq("#r3z-ifrm"),
  105. t = _r3z.jq("#r3z-quest"),
  106. n = _r3z.jq("#r3z-addoor");
  107. if (!(e.length && r.length && t.length && n.length))
  108. return;
  109. e.outerWidth(n.outerWidth());
  110. var i = r.offset().top + r.outerHeight();
  111. var a = _r3z.jq(window).scrollTop();
  112. var o = t.offset().top;
  113. if (a >= i && !_r3z.jq(".r3z-stick").length) {
  114. e.width(e.width());
  115. e.addClass("r3z-stick")
  116. } else if (a <= o && _r3z.jq(".r3z-stick").length)
  117. e.removeClass("r3z-stick")
  118. }
  119. _r3z.pub = {
  120. pid : location.hostname,
  121. abm : 1,
  122. rzl : 1,
  123. cke : 1,
  124. pre : 0,
  125. dom : 1,
  126. stk : 1,
  127. pix : {
  128. gnc : ["http://ib.adnxs.com/seg?add=5015431&t=1"],
  129. abp : ["http://ib.adnxs.com/seg?add=4878592&t=1"],
  130. wld : ["http://ib.adnxs.com/seg?add=4878598&t=1"]
  131. },
  132. pxi : [],
  133. fns : {
  134. sho : 0,
  135. ins : 0,
  136. rev : 0,
  137. abt : 0,
  138. pbk : 0,
  139. evt : {
  140. imp : 0,
  141. ivw : 0,
  142. ulk : 0,
  143. clk : 0,
  144. vst : 0,
  145. v25 : 0,
  146. v50 : 0,
  147. v75 : 0,
  148. ven : 0
  149. }
  150. },
  151. cap : {
  152. pmx : 1,
  153. prs : 3600 * 24 * 30,
  154. oix : 0,
  155. ifm : 0,
  156. frs : 3600 * 24
  157. },
  158. htm : {
  159. pre : "",
  160. pst : "",
  161. ins : ""
  162. },
  163. blk : {
  164. tmo : 5,
  165. rev : 0,
  166. msg : ""
  167. },
  168. ero : {
  169. mvs : 100,
  170. mer : .1
  171. }
  172. };
  173. _r3z.pub.htm.ins = '<div id="r3z-inst-top" class="r3z-inst"><span>&#9660;</span><p id="r3z-inst">[r3z-ad-inst] to reveal the rest of the article. You\'ll only have to answer one question a month.</p><span>&#9660;</span></div>';
  174. _r3z.pub.blk.msg = '<p id="r3z-blkmsg">We have been unable to show you advertisements on this page, which is likely to be the result of an <strong>ad blocker</strong> being installed on your device.<br><br> Computerworld UK\'s journalism is funded by advertising, please disable your ad blocker and refresh the page to view the remainder of this article in full.<br><br> Please click <a href="/adblock/" target="_blank">here</a> for information about how to disable your ad blocker and whitelist Computerworld UK.<br><br> Thanks!<br><br> The Computerworld UK team</p>';
  175. _r3z.pub.fns.ins = function () {
  176. var n = '<div id="r3z-wait">' + '<img id="r3z-wait-img" src="/assets/redacted/WaitAnim800.gif">' + "</div>" + '<div id="r3z-addoor" style="display:none"></div>' + '<div id="r3z-response" style="display:none"></div>';
  177. var a = '<div id="r3z-kicker" style="display:none"></div>';
  178. var o = "@font-face{font-family:'redacted_scriptbold';src:url('/assets/redacted/redacted-script-bold.eot');src:url('/assets/redacted/redacted-script-bold.eot?#iefix') format('embedded-opentype'),url('/assets/redacted/redacted-script-bold.woff2') format('woff2'),url('/assets/redacted/redacted-script-bold.woff') format('woff'),url('/assets/redacted/redacted-script-bold.ttf') format('truetype'),url('/assets/redacted/redacted-script-bold.svg#redacted_scriptbold') format('svg');font-weight:normal;font-style:normal}.r3z-inst{display:table;color:white;background:#7d041a;margin:10px 0;padding:10px 5px;box-sizing:border-box;width:100%}.r3z-inst span{display:table-cell;width:5%;color:white;font-size:20px;text-align:center;vertical-align:middle}.r3z-inst p{display:table-cell;width:90%;color:white;text-align:center;vertical-align:middle}#r3z-inst-bot{z-index:1000}#r3z-blkmsg{display:block;color:black;text-align:center;border:3px solid #8B0B1B;margin:10px 0;padding:10px 15px;background-color:#EFEFEF!important;font-family:sans-serif!important}#r3z-blkmsg strong{font-weight:bold!important;font-family:sans-serif!important}#r3z-blkmsg a{font-weight:bold!important;color:#8B0B1B!important;text-decoration:underline!important}#r3z-wait{display:block;width:100%;margin:0;padding:0;border:0;outline:0}#r3z-wait-img{width:100%;height:auto;margin:0;padding:0;border:0;outline:0}.r3z-hide,.r3z-hide *{color:lightgrey!important;text-decoration:none!important;font-family:redacted_scriptbold!important}iframe.r3z-hide,.r3z-hide iframe{opacity:0.1!important}img.r3z-hide,.r3z-hide img{opacity:0.1!important}#r3z-response iframe,#r3z-kicker iframe{margin-left:0}.r3z-stick{position:fixed;top:33%}div#dynamicAritlceContainer section#articleBody p{font-family:redacted_scriptbold!important}";
  179. var d = 200;
  180. var p = 2;
  181. var u = 50;
  182. if (_r3z.jq("#r3z-addoor").length || _r3z.prg && _r3z.prg.flg.rev)
  183. return;
  184. var c = _r3z.jq("div#wrapper section.mainContent").first().find("article section#articleBody p");
  185. if (_r3z.jq("section#slideshow").length) {
  186. c = _r3z.jq("section#slideshow p");
  187. p = 1;
  188. d = 20;
  189. u = 10
  190. }
  191. if (c.length <= p || i(c.text()) <= d)
  192. return;
  193. while (i(_r3z.jq(c.slice(0, p)).text()) < u)
  194. p++;
  195. if (_r3z.pub.abm) {
  196. var f;
  197. setTimeout(function () {
  198. document.getElementById("r3z-wait").innerHTML = _r3z.pub.blk.msg;
  199. _r3z.pub.blk.rev = 1;
  200. if (_r3z.pub.fns.abt()) {
  201. f = new Date;
  202. f.setTime(f.getTime() + 10 * 60 * 1e3);
  203. r("r3z.abd", 1, f);
  204. e(_r3z.pub.pix.abp);
  205. abEnabled(true)
  206. }
  207. }, _r3z.pub.blk.tmo * 1e3)
  208. }
  209. s(o);
  210. _r3z.jq(c[p - 1]).after(n);
  211. _r3z.jq("#r3z-response").nextAll().addClass("r3z-hide");
  212. _r3z.jq(".r3z-hide").last().after(a);
  213. var h = _r3z.jq(".r3z-hide");
  214. for (var z = 0; z < h.length; z++) {}
  215.  
  216. _r3z.pub.fns.rev = function () {
  217. var n = _r3z.jq(".r3z-hide");
  218. for (var i = 0; i < n.length; i++) {}
  219.  
  220. _r3z.jq(".r3z-hide").removeClass("r3z-hide");
  221. abEnabled(false);
  222. var a = t("r3z.abd");
  223. if (a) {
  224. e(_r3z.pub.pix.wld);
  225. abConversion();
  226. r("r3z.abd", "", new Date(0))
  227. }
  228. };
  229. if (_r3z.pub.stk) {
  230. _r3z.pub.htm.pst = '<a href="#r3z-addoor"><div id="r3z-inst-bot" class="r3z-inst"><span>&#9650;</span><p>Please answer the question above to reveal the rest of the article.</p><span>&#9650;</span></div></a>';
  231. _r3z.jq(window).scroll(l);
  232. _r3z.jq(window).resize(l)
  233. }
  234. };
  235. _r3z.pub.fns.abt = function () {
  236. var e,
  237. r = 0,
  238. t,
  239. n,
  240. i,
  241. a;
  242. a = ["[class^=ad][class*=Container]"];
  243. for (n = 0; n < a.length; n++) {
  244. t = $(a[n]);
  245. if (!t)
  246. continue;
  247. for (i = 0; i < t.length; i++) {
  248. e = $(t[i]).height();
  249. if (e >= 90) {
  250. try {
  251. if ($(t[i]).find("div[id^='google_ads_iframe_']").length) {
  252. e = $($($(t[i]).find("div[id^='google_ads_iframe_'] iframe").contents()[0])).height()
  253. } else {
  254. e = 0
  255. }
  256. } catch (o) {
  257. e = 0;
  258. console.log(o)
  259. }
  260. }
  261. r += e < 90 ? 0 : e
  262. }
  263. }
  264. return r < 90
  265. };
  266. if (_r3z.pub.abm) {
  267. if (_r3z.pub.dom)
  268. _r3z.jq(document).ready(_r3z.pub.fns.ins);
  269. else
  270. _r3z.pub.fns.ins()
  271. }
  272. e()
  273. })();
Advertisement
Add Comment
Please, Sign In to add comment