Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- window._r3z = window._r3z || {};
- _r3z.cid = "AAB/www.computerworlduk.com";
- _r3z.jq = window.jQuery ? jQuery : 0;
- if (!_r3z.jq)
- return;
- function e(e) {
- e = e || _r3z.pub.pix.gnc;
- var r = e;
- for (var t = 0; t < r.length; t++) {
- _r3z.pub.pxi.push(new Image);
- try {
- _r3z.pub.pxi[_r3z.pub.pxi.length - 1].src = decodeURIComponent(r[t])
- } catch (n) {
- console.log("Bad URL: " + src)
- }
- }
- }
- function r(e, r, t, n) {
- var i,
- a;
- a = t ? "; expires=" + t.toUTCString() : "";
- i = "; path=" + (n || "/");
- document.cookie = e + "=" + r + a + i
- }
- function t(e) {
- var r = e + "=";
- var t = document.cookie.split(";");
- for (var n = 0; n < t.length; n++) {
- var i = t[n];
- while (i.charAt(0) == " ")
- i = i.substring(1);
- if (i.indexOf(r) == 0)
- return i.substring(r.length, i.length)
- }
- return ""
- }
- function n() {
- if (navigator.userAgent.indexOf("Googlebot") >= 0 || navigator.userAgent.indexOf("bingbot") >= 0) {
- return false
- }
- return true
- }
- function i(e) {
- return _r3z.jq.trim(e.replace(/[^\w']/gi, " ")).split(/\s+/).length
- }
- function a(e) {
- _r3z.jq(e).contents().filter(function () {
- return this.nodeType == 3
- }).wrap("<p></p>").end().filter("br").remove()
- }
- function o(e) {
- for (var r = 0; r < e.length; r++) {
- if (_r3z.jq(e[r]).html().search(/<br>\s*<br>/) == -1)
- continue;
- _r3z.jq(e[r]).after("<p>" + _r3z.jq(e[r]).html().replace(/<br>\s*<br>/g, "</p><p>") + "</p>");
- _r3z.jq(e[r]).remove()
- }
- }
- function s(e) {
- var r = document.head || document.getElementsByTagName("head")[0],
- t = document.createElement("style"),
- n;
- t.type = "text/css";
- n = e.replace(/}/g, "}\n");
- n = n.replace(/\[CDN\]/g, _r3z.cdn);
- if (t.styleSheet)
- t.styleSheet.cssText = n;
- else
- t.appendChild(document.createTextNode(n));
- r.appendChild(t)
- }
- function d(e, r) {
- function t(e, r) {
- var t = [function (e, r) {
- var t = r % 2 == 0 ? 2 : 1;
- return e < r / 2 ? r - 2 * e - t : 2 * e + (t - 1) - r
- }, function (e, r) {
- var t = r % 2 == 0 ? 1 : 0;
- return e % 2 == 0 ? (r - t - 1 - e) / 2 : (r - t + e) / 2
- }
- ];
- var n,
- i = e.length;
- var a = new Array(i);
- for (n = 0; n < i; n++)
- a[t[r](n, i)] = e[n];
- return a.join("")
- }
- if (e.nodeType == 3) {
- var n = e.nodeValue;
- if (r) {
- if (n.substring(0, 2) == "__" && n.substring(n.length - 2) == "__")
- e.nodeValue = t(n.substring(2, n.length - 2), r)
- } else
- e.nodeValue = "__" + t(n, r) + "__"
- } else {
- for (var i = 0; i < e.childNodes.length; i++)
- d(e.childNodes[i], r)
- }
- }
- function l() {
- var e = _r3z.jq("#r3z-inst-bot"),
- r = _r3z.jq("#r3z-ifrm"),
- t = _r3z.jq("#r3z-quest"),
- n = _r3z.jq("#r3z-addoor");
- if (!(e.length && r.length && t.length && n.length))
- return;
- e.outerWidth(n.outerWidth());
- var i = r.offset().top + r.outerHeight();
- var a = _r3z.jq(window).scrollTop();
- var o = t.offset().top;
- if (a >= i && !_r3z.jq(".r3z-stick").length) {
- e.width(e.width());
- e.addClass("r3z-stick")
- } else if (a <= o && _r3z.jq(".r3z-stick").length)
- e.removeClass("r3z-stick")
- }
- _r3z.pub = {
- pid : location.hostname,
- abm : 1,
- rzl : 1,
- cke : 1,
- pre : 0,
- dom : 1,
- stk : 1,
- pix : {
- gnc : ["http://ib.adnxs.com/seg?add=5015431&t=1"],
- abp : ["http://ib.adnxs.com/seg?add=4878592&t=1"],
- wld : ["http://ib.adnxs.com/seg?add=4878598&t=1"]
- },
- pxi : [],
- fns : {
- sho : 0,
- ins : 0,
- rev : 0,
- abt : 0,
- pbk : 0,
- evt : {
- imp : 0,
- ivw : 0,
- ulk : 0,
- clk : 0,
- vst : 0,
- v25 : 0,
- v50 : 0,
- v75 : 0,
- ven : 0
- }
- },
- cap : {
- pmx : 1,
- prs : 3600 * 24 * 30,
- oix : 0,
- ifm : 0,
- frs : 3600 * 24
- },
- htm : {
- pre : "",
- pst : "",
- ins : ""
- },
- blk : {
- tmo : 5,
- rev : 0,
- msg : ""
- },
- ero : {
- mvs : 100,
- mer : .1
- }
- };
- _r3z.pub.htm.ins = '<div id="r3z-inst-top" class="r3z-inst"><span>▼</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>▼</span></div>';
- _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>';
- _r3z.pub.fns.ins = function () {
- 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>';
- var a = '<div id="r3z-kicker" style="display:none"></div>';
- 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}";
- var d = 200;
- var p = 2;
- var u = 50;
- if (_r3z.jq("#r3z-addoor").length || _r3z.prg && _r3z.prg.flg.rev)
- return;
- var c = _r3z.jq("div#wrapper section.mainContent").first().find("article section#articleBody p");
- if (_r3z.jq("section#slideshow").length) {
- c = _r3z.jq("section#slideshow p");
- p = 1;
- d = 20;
- u = 10
- }
- if (c.length <= p || i(c.text()) <= d)
- return;
- while (i(_r3z.jq(c.slice(0, p)).text()) < u)
- p++;
- if (_r3z.pub.abm) {
- var f;
- setTimeout(function () {
- document.getElementById("r3z-wait").innerHTML = _r3z.pub.blk.msg;
- _r3z.pub.blk.rev = 1;
- if (_r3z.pub.fns.abt()) {
- f = new Date;
- f.setTime(f.getTime() + 10 * 60 * 1e3);
- r("r3z.abd", 1, f);
- e(_r3z.pub.pix.abp);
- abEnabled(true)
- }
- }, _r3z.pub.blk.tmo * 1e3)
- }
- s(o);
- _r3z.jq(c[p - 1]).after(n);
- _r3z.jq("#r3z-response").nextAll().addClass("r3z-hide");
- _r3z.jq(".r3z-hide").last().after(a);
- var h = _r3z.jq(".r3z-hide");
- for (var z = 0; z < h.length; z++) {}
- _r3z.pub.fns.rev = function () {
- var n = _r3z.jq(".r3z-hide");
- for (var i = 0; i < n.length; i++) {}
- _r3z.jq(".r3z-hide").removeClass("r3z-hide");
- abEnabled(false);
- var a = t("r3z.abd");
- if (a) {
- e(_r3z.pub.pix.wld);
- abConversion();
- r("r3z.abd", "", new Date(0))
- }
- };
- if (_r3z.pub.stk) {
- _r3z.pub.htm.pst = '<a href="#r3z-addoor"><div id="r3z-inst-bot" class="r3z-inst"><span>▲</span><p>Please answer the question above to reveal the rest of the article.</p><span>▲</span></div></a>';
- _r3z.jq(window).scroll(l);
- _r3z.jq(window).resize(l)
- }
- };
- _r3z.pub.fns.abt = function () {
- var e,
- r = 0,
- t,
- n,
- i,
- a;
- a = ["[class^=ad][class*=Container]"];
- for (n = 0; n < a.length; n++) {
- t = $(a[n]);
- if (!t)
- continue;
- for (i = 0; i < t.length; i++) {
- e = $(t[i]).height();
- if (e >= 90) {
- try {
- if ($(t[i]).find("div[id^='google_ads_iframe_']").length) {
- e = $($($(t[i]).find("div[id^='google_ads_iframe_'] iframe").contents()[0])).height()
- } else {
- e = 0
- }
- } catch (o) {
- e = 0;
- console.log(o)
- }
- }
- r += e < 90 ? 0 : e
- }
- }
- return r < 90
- };
- if (_r3z.pub.abm) {
- if (_r3z.pub.dom)
- _r3z.jq(document).ready(_r3z.pub.fns.ins);
- else
- _r3z.pub.fns.ins()
- }
- e()
- })();
Advertisement
Add Comment
Please, Sign In to add comment