悪名高きスクロール妨害広告を解析する

@huzisuke 様による[悪名高きスワイプ広告を解析する](https://qiita.com/huzisuke/items/cdc63b4bf9d2ded5b5ca)への~~便乗~~リスペクト記事です。

https://qiita.com/huzisuke/items/cdc63b4bf9d2ded5b5ca

# スクロール妨害広告
:::note alert
以下の折り畳みに掲載しているキャプチャには<font color="red"><b>性的な広告が含まれます</b></font>。十分にご注意ください。
:::

<details><summary>スクロール妨害広告</summary><div>

![adv.toobig (1).gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/507500/5975e8f1-55eb-a5f7-7409-b8468e310975.gif)
</div></details>

いくら下にスクロールしても強制的に巻き戻されてしまいます。

こちらが実際に採取したコードです。長いので折りたたみに入れていますが、別に全部読む必要はないです。

<details><summary>採取した HTML</summary><div>

```HTML
<!-- Generated by まとめくす (https://2mtmex.com/) -->
<div class="article_mid_v2">
   <div id="article_mid_v2">
      <script type="text/javascript">
         (function(){
         var ua = window.navigator.userAgent;
         var android_reg = /android/i;
         var android_rand = Math.floor(Math.random() * (100)) + 1;
         var ios_rand = Math.floor(Math.random() * (115)) + 1;
         if (ua.match(android_reg)) {
         if (100 >= android_rand) {
             var elements = jQuery(decodeURIComponent(''));
             jQuery('head').append(elements);
             document.write(decodeURIComponent('%3C%21--%20%20ad%20tags%20Size%3A%20300x250%20ZoneId%3A1399201--%3E%0D%0A%3Cscript%20type%3D%22text%2Fjavascript%22%20src%3D%22https%3A%2F%2Fjs.gsspcln.jp%2Ft%2F399%2F201%2Fa1399201.js%22%3E%3C%2Fscript%3E'));
         }

         } else {
         if (15 >= ios_rand) {
             var elements = jQuery(decodeURIComponent(''));
             jQuery('head').append(elements);
             document.write(decodeURIComponent('%3Cdiv%20class%3D%22ca_profitx_ad_container%20ca_profitx_mediaid_3771%20ca_profitx_pageid_31631%22%3E%0D%0A%3Cdiv%20class%3D%22ca_profitx_ad%22%20data-ca-profitx-ad%20data-ca-profitx-tagid%3D%2222954%22%20data-ca-profitx-spotid%3D%22pfxad_22954%22%20data-ca-profitx-pageid%3D%2231631%22%3E%3C%2Fdiv%3E%0D%0A%3Cdiv%20class%3D%22ca_profitx_ad%22%20data-ca-profitx-ad%20data-ca-profitx-tagid%3D%2222955%22%20data-ca-profitx-spotid%3D%22pfxad_22955%22%20data-ca-profitx-pageid%3D%2231631%22%3E%3C%2Fdiv%3E%0D%0A%3Cdiv%20class%3D%22ca_profitx_ad%22%20data-ca-profitx-ad%20data-ca-profitx-tagid%3D%2222955%22%20data-ca-profitx-spotid%3D%22pfxad_22955_2%22%20data-ca-profitx-pageid%3D%2231631%22%3E%3C%2Fdiv%3E%0D%0A%3Cdiv%20class%3D%22ca_profitx_ad%22%20data-ca-profitx-ad%20data-ca-profitx-tagid%3D%2222955%22%20data-ca-profitx-spotid%3D%22pfxad_22955_3%22%20data-ca-profitx-pageid%3D%2231631%22%3E%3C%2Fdiv%3E%0D%0A%3Cdiv%20class%3D%22ca_profitx_ad%22%20data-ca-profitx-ad%20data-ca-profitx-tagid%3D%2222955%22%20data-ca-profitx-spotid%3D%22pfxad_22955_4%22%20data-ca-profitx-pageid%3D%2231631%22%3E%3C%2Fdiv%3E%0D%0A%3Cdiv%20class%3D%22ca_profitx_ad%22%20data-ca-profitx-ad%20data-ca-profitx-tagid%3D%2222956%22%20data-ca-profitx-spotid%3D%22pfxad_22956%22%20data-ca-profitx-pageid%3D%2231631%22%3E%3C%2Fdiv%3E%0D%0A%3Cscript%20data-ca-profitx-pageid%3D%2231631%22%20src%3D%22https%3A%2F%2Fcdn.caprofitx.com%2Fmedia%2F3771%2Fpfx.js%22%20type%3D%22text%2Fjavascript%22%20charset%3D%22utf-8%22%20data-ca-profitx-js%20async%3E%3C%2Fscript%3E'));
         }
         else if (115 >= ios_rand) {
             var elements = jQuery(decodeURIComponent(''));
             jQuery('head').append(elements);
             document.write(decodeURIComponent('%3C%21--%20%20ad%20tags%20Size%3A%20300x250%20ZoneId%3A1399201--%3E%0D%0A%3Cscript%20type%3D%22text%2Fjavascript%22%20src%3D%22https%3A%2F%2Fjs.gsspcln.jp%2Ft%2F399%2F201%2Fa1399201.js%22%3E%3C%2Fscript%3E'));
         }

         }
         })();

      </script><!--  ad tags Size: 300x250 ZoneId:1399201-->
      <script type="text/javascript" src="https://js.gsspcln.jp/t/399/201/a1399201.js"></script>
      <div>
         <script type="text/javascript">!function(){"use strict";"//dmp.im-apps.net/scripts/im-uid-hook.js?cid=".concat(3929);var t="_im_uid.".concat(3929);var e=function(){return function(t){var e="";try{if("function"!=typeof t)return"";e=t()}catch(t){console.error(t)}return"string"!=typeof e||""===e?"":"&keyword=".concat(function(t){try{return t===decodeURIComponent(t)?encodeURIComponent(t):t}catch(e){return encodeURIComponent(t)}}(e))}()},n=function(t){return window.encodeURIComponent(t).replace(/'/g,"%27")};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o,i,c,a,u="loc",s="ref",d="ct0",p="country",f="city",l="long",m="lati",w="custom",_="idfa",g="bundle",y="minor",v="value";function h(t,e){return e in t&&void 0!==t[e]&&null!=t[e]&&""!=t[e]}function b(t){return!(void 0===t||"object"!=r(t)||!t)}function E(){return b(window.geparams)?window.geparams:{}}function S(){var t=document,e=E(),r=void 0!==t.referrer?t.referrer:"";if((!(u in e)||"string"!=typeof e.loc||"function"!=typeof e.loc.substring||"http"!==e.loc.substring(0,4))&&(e.loc=t.location?t.location.href:"",window.top!==window.self))try{e.loc=window.top.location.href,r=window.top.document.referrer}catch(t){try{window.frameElement&&!window.frameElement.src?r="":r&&(e.loc=r)}catch(t){r&&(e.loc=r)}}s in e&&"string"==typeof e.ref&&"function"==typeof e.ref.substring&&"http"===e.ref.substring(0,4)||(e.ref=r),d in e&&"string"==typeof e.ct0&&"function"==typeof e.ct0.substring&&"http"===e.ct0.substring(0,4)||(e.ct0="undefined",void 0!==t.GEN_ct0&&"string"==typeof t.GEN_ct0&&"function"==typeof t.GEN_ct0.substring&&"http"==t.GEN_ct0.substring(0,4)&&(e.ct0=t.GEN_ct0));var o="https://"+String("aladdin.genieesspv.jp")+"/yie/ld/jsk";o+="?zoneid="+1399201;var i=e.loc.split("?");if(i.length>1){var c=i[1],a=new URLSearchParams(c).get("aladdin_test_adsource");o+=a?"&amp;aladdin_test_adsource="+a:""}o+="&amp;cb="+Math.floor(99999999999*Math.random()),o+=t.charset?"&amp;charset="+t.charset:t.characterSet?"&amp;charset="+t.characterSet:"",o+="&amp;loc="+n(e.loc),o+="undefined"!==e.ct0?"&amp;ct0="+n(e.ct0):"",o+=e.ref?"&amp;referer="+n(e.ref):"";try{"[object Window]"===window.self.toString()&&"[object Window]"===window.parent.toString()||(o+="&amp;err=1")}catch(t){}return _ in e&&(o+="&amp;idfa="+n(e.idfa)),"lat"in e&&(o+="&amp;adtk="+n(e.lat?"0":"1")),o+=function(){if("undefined"==typeof screen)return"";var t=screen.width,e=screen.height;return t>e?"&amp;sw="+e+"&amp;sh="+t:"&amp;sw="+t+"&amp;sh="+e}(),(o+="&amp;topframe="+(window.parent==window.self?1:0))+function(){var t;try{t=JSON.parse(function(){try{return localStorage&&localStorage.getItem("ua")||null}catch(t){return null}}())}catch(t){return""}if(!t)return"";var e="";if(t.fullVersionList){e+="&ucfvl=";var r=t.fullVersionList.reduce((function(t,e){var n=t;return n&&(n+=","),n+'"'+e.brand+'";v="'+e.version+'"'}),"");e+=n(r)}return t.platform&&(e+="&ucp="+n('"'+t.platform+'"')),t.architecture&&(e+="&ucarch="+n('"'+t.architecture+'"')),t.platformVersion&&(e+="&ucpv="+n('"'+t.platformVersion+'"')),t.bitness&&(e+="&ucbit="+n('"'+t.bitness+'"')),e+="&ucmbl=?"+(t.mobile?"1":"0"),t.model&&(e+="&ucmdl="+n('"'+t.model+'"')),e}()}function k(){var r,o,i=(o=t,((r=function(){try{return document.cookie.split("; ").reduce((function(t,e){var n=e.split("=");return t[n[0]]=n[1],t}),{})}catch(t){return{}}}()[o]||"")?"&".concat("extuid","=").concat(encodeURIComponent("".concat("im",":").concat(r))):"")+e());return void 0!==window.__geniee_rtus&&null!=window.__geniee_rtus&&""!=window.__geniee_rtus&&(i+="&amp;rtus="+n(window.__geniee_rtus)),void 0!==window.__geniee_rta&&null!=window.__geniee_rta&&""!=window.__geniee_rta&&(i+="&amp;custom_rta="+n(window.__geniee_rta)),i}o=S()+function(){var t=E(),e="";if(h(t,"zip")&&(e+="&amp;zip="+n(t.zip)),h(t,p)&&(e+="&amp;country="+n(t.country)),h(t,f)&&(e+="&amp;city="+n(t.city)),h(t,l)&&(e+="&amp;long="+n(t.long)),h(t,m)&&(e+="&amp;lati="+n(t.lati)),h(t,g)&&(e+="&amp;apid="+n(t.bundle)),w in t&&b(t.custom))for(var r in t.custom)h(t.custom,r)&&(e+="&amp;"+n("custom_"+r)+"="+n(t.custom[r]));var o=window.gecuparams;return b(o)&&(h(o,"ver")&&(e+="&amp;gc_ver="+n(o.ver)),h(o,y)&&(e+="&amp;gc_minor="+n(o.minor)),h(o,v)&&(e+="&amp;gc_value="+n(o.value))),e}()+k()+(i="",void 0!==window.__geniee_usd&&void 0!==window.__geniee_usd.kvc&&""!=window.__geniee_usd.kvc&&(i+="&amp;etp="+window.__geniee_usd.kvc),i)+((a=function(t){for(var e="",n=0;n<t.length;n++)2==t[n].length&&""!=t[n][0]&&""!=t[n][1]&&(""!==e&&(e+="&"),e+=t[n][0]+"="+t[n][1]);return e}([["pgid",(c=function(t){var e=document.getElementById(t);return e&&e.title?e.title:""})("_geniee_pid")],["iss",c("_geniee_iss")]]))?"&"+a:""),document.open(),document.write("<script type='text/javascript' src='"+o+"'><\/script>"),document.close()}();</script><script type="text/javascript" src="https://aladdin.genieesspv.jp/yie/ld/jsk?zoneid=1399201&amp;cb=13008025797&amp;charset=UTF-8&amp;loc=http%3A%2F%2Fblog.livedoor.jp%2Fkinisoku%2Farchives%2F5459492.html&amp;referer=http%3A%2F%2Fblog.livedoor.jp%2Fkinisoku%2Farchives%2F5459516.html%3Fref%3Dpopular_article%26id%3D4169625-1167916&amp;sw=375&amp;sh=667&amp;topframe=1&amp;extuid=im%3Ai.Ij08YArIQVCrLTp0FSx5Yg&amp;rtus=VTcX0DKzdkmWlUXM-Wpr5vFEDMPfciQS&amp;etp=rTnBPfsI8Q2pt7eyhsH1WUZzN9x49XvPmKeopKbhsVRmpwoqnA9uiua95b9WkkCNOf2_dt9hkLep-u0IjxQhKca8eO0YDoIerLo6oKuyriTsXvEwf9dE5yfwGx6f1E6yBGiH7uLz05dGCHnjGwVED7wXHFLev74KRqALhHDBX99V2Agt0T09xBLrqcpXDgMSqFg4Mlmdd9bcZXzZSSwVpupG1c0USMrK0JfHEPASnTcu36iAfuG3vPL_sGkQDfTXBLFL2TYg_TFnQM7l9hKE1yqWG0jcqtlTEJ9l3hsijRlKSVgEkPASGUb8RPNojYBFiBnZTA"></script><script type="text/javascript">var SSPPassback2=function(){var bl=0,pc=0,pr=0,ac=0,er=0,si=null,cu=0,ci=0,cp=0,ca=0,cf=0,ve=0,ir=0,d=document;this.sl=function(bd){bl=bd;if(bl['jp']!=undefined){pr=bl['jp'];delete bl['jp'];}if(bl['jac']!=undefined){ac=bl['jac'];delete bl['jac'];}if(bl['ctu']!=undefined){cu=bl['ctu'];delete bl['ctu'];}if(bl['vie']!=undefined){if(bl['vie']==1)ve=1;delete bl['vie'];}};this.gb=function(){var bt="";if(bl[pc]&&bl[pc].tag!=""){if(ci==0){ci="gn_delivery_1399201_c4661218";bt+="<div id=\""+ci+"\">";bt+=bl[pc].tag;bt+="<\/"+"div>";}else bt=bl[pc].tag;}return bt;};this.ic=function(){pc+=1;};this.gv=function(){if(typeof window.gnInview==='undefined'&&ve!=0){var ivel=document.createElement('script');ivel.type='text/javascript';ivel.src='https://js.gsspcln.jp/j/inview.20190130.min.js';document.body.appendChild(ivel);}};this.gp=function(){if(pr!=0)d.write(pr);};this.ga=function(){if(ac!=0)d.write(ac);};this.cd=function(pe){var dr=0;for(var ce=pe.firstChild;ce!=null;ce=ce.nextSibling){if(ce.nodeType==1){if(ce.nodeName=='A'){if(typeof(ce.href)!=='undefined'&&ce.href!=null&&ce.href!='')return 1;}else if(ce.nodeName=='IFRAME')return 1;if(ce.nodeName!='SCRIPT'){dr=this.cd(ce);if(dr==1)return 1;}}}return dr;};this.rp=function(){if(cp==0){var pf=d.getElementById(ci)?d.getElementById(ci).parentNode:null;while(pf!=null&&pf!=d.documentElement&&pf!=d.body){if(pf.nodeType==1&&pf.nodeName=="DIV")break;pf=pf.parentNode;}cp=(pf==null?d.body:pf);}return cp;};this.sp=function(){if(cf!=0)return;cf=1;var i=0;var n="";for(;i<pc-1;i++){if(bl[i].ctt!=0){if(n.length>0)n+=",";n+=bl[i].as;}}var a="";if(i<pc&&bl[i].ctt!=0){ca=bl[i].as;if(er==0){if(n.length>0)n+=",";n+=ca;}else if(bl[i].jpf==1)a+=ca;else{var af=d.getElementById(ci);if(af!=null&&this.cd(af)==0){if(n.length>0)n+=",";n+=ca;}else a+=ca;}}if(cu!=0&&(n.length>0||a.length>0)){var u=cu+"?cik=wUMbeZdyK0nBwJz2UoTuhnF0bSMfkSosbY7QPaqG0U79Vw9ZtLIXPJKNA8qYuuf1Y7869U5xQzKxIodhQJzXUCgWmQQ";if(n.length>0)u+=("&noas="+n);if(a.length>0)u+=("&asid="+a);var t=d.createElement("img");t.style.display="none";t.style.visibility="hidden";t.width="0";t.height="0";t.src=u;this.rp().appendChild(t);if(ca!=0){if(this.rt()==0){var st=d.createElement("script");st.type="text/javascript";st.src="https://js.gsspcln.jp/j/rtct_adp_lib.20200515.min.js?GenieeDeliveryZoneName=gpb_1399201";this.rp().appendChild(st);}}}};this.rt=function(){if(ir==0&&typeof(GncTracker)!=="undefined"&&typeof(GncTracker)=="object"&&GncTracker&&typeof(GncTracker.add)!=="undefined"&&typeof(GncTracker.add)=="function"&&GncTracker.add){ir=1;GncTracker.add(d.getElementById(ci),function(args){GncTracker.sendData(cu,{"cik":"epJLSSyje3lj9Oepk43ploAGIW5aAGwtugRnGNOE0pdkwoLrH9DN3jkjc4k8JTLgBJsLYKb-m-NhtVwQgxQuOzS2zeM","asid":ca,"zid":1399201,"clickURL":args.clickUrl,});});}return ir;};this.bp=function(){var b=this.gb();if(b!=''){this.ic();er=-1;d.write(b);if(ve!=0&&bl[pc-1].viu!='')this.vi();si=setTimeout("gpb_1399201.sr()",2000);}else this.sp();};this.su=function(){er=0;if(si!=null){clearTimeout(si);si=null;}this.bp();};this.vi=function(){window.gnInview=window.gnInview||{};window.gnInview.cmd=window.gnInview.cmd||[];window.gnInview.cmd.push(function(){window.gnInview.addTarget(ci,bl[pc-1].viu);});};this.ifud=function(nd){if(d!==nd)d=nd;};};SSPPassback2.prototype={passBack:function(){this.su();},preparePassBack:function(nd){this.ifud(nd);},sr:function(){this.sp();},registerClickTracking:function(){this.rt();},run:function(bd){this.sl(bd);this.gv();this.gp();this.bp();this.ga();}};var gpb_1399201=new SSPPassback2();var jd={"jp":"<div class=\"gn_scrollCatchAd\" id=\"gn-scroll-catch-ad1399201\" data-width-value=\"300\" data-height-value=\"250\" data-stop-time=\"0.1\" data-activate-percentage=\"0\" data-use-blind=\"false\" data-use-loading=\"false\" style=\"text-align:center;\" data-asid=\"0\" id=\"gn-scroll-catch-ad1399201\">\r\n<div id=\"1399201\" style=\"width: 100%;\">","0":{"tag":"<a href=\"https:\/\/cs.gssprt.jp\/yie\/ld\/ck?zid=1399201&asid=8685254&idx=0&gid=bbb7fd46dc7f4c90aaaffe1eafb58c1d&l=zLk9jo80R3tBZrWzWPzRm5jBRM2tEniMY63wHbvgnQiwEFohAJ53dP38SWOnpGQFRiZpFNDp26BA4CVLKgzlzZBlwoMlkgWpKvqSQ5DdBMQSL8D43a9klQjCfhN20i68_XIzvKcd7NtBu2IZ9ySgsemUCInXLqqsk-m3BlUlO0EvZ0BhG78H_nXwS5KOghJ_o5tFk7jXZqEs4QS4fOFqQx7WYHfkDuV2hR3nfyebCccapAHEEWqHTqcrAeh767g5av94ac80yx4KRvdWP_4HPRhKZUZOqjxEfIb57VH0giBiEWUsYomWBe6fuKFbl7B1V5eO73Scl5PToFkTMoXZ_X-4EYzURziJJsOfzJS6fbkTzArpAYaaQ1tm1mU-l8jpluDU9-s9kwUUzTlH_QzV2vr-gCNeuOFdZ8U07A_sp7rWDmb7sEX-_B7yVn0f5mhdcRzQPaU7vOScAefCXNTIoJZ_Sx43O3vN&dest=https%3A%2F%2Fspnativeapi.i-mobile.co.jp%2Fapi%2Fad_link.ashx%3Fpid%3D73211%26mid%3D523463%26asid%3D1710422%26advid%3D7022575%26vh%3D2e83945d10dd14f22eed7ea32e5863ab\" target=\"_blank\"><img src=\"https:\/\/spcdnsp.i-mobile.co.jp\/ad_creative.ashx?advid=7022575&eid=15\" width=\"300\" height=\"250\" border=\"0\"><\/a><div style=\"position: absolute; left: 0px; top: 0px; visibility: hidden;\"><img src=\"https:\/\/spnativeapi-tls.i-mobile.co.jp\/api\/ad_imp_count.ashx?pid=73211&mid=523463&asid=1710422&advid=7022575\" width=\"0\" height=\"0\" alt=\"\" style=\"width: 0px; height: 0px;\"><\/div><div style=\"position: absolute; left: 0px; top: 0px; visibility: hidden;\"><img src=\"https:\/\/aladdin.genieesspv.jp\/yie\/ld\/gl3?zid=1399201&asid=8685254&idx=0&gid=bbb7fd46dc7f4c90aaaffe1eafb58c1d&cb=259be333d9&l=tc513Wn721v3zkDNiUONTdY1WN68uekQb4647VvqZkighlqM90QW3tDbMIv0mV8cSEt3geat2fg3QTYJmpV0IPGs60OaBs412_m_k-Xc8lARCXxtHhOtcIT3KrIaEoyqt234AJXVglW4h_aEFhWV_3e4y69dDjlOjsD4j6gbGbvU05rWtpTJj9H0hzWRPF1ds4mp9lJYVnaUVIpPl4H7mmt7BkRnry2UzCuRDTG-mtyzlOvm7_88liCQ32XGPOuPRtz9k3fKOD2Hspbfi7txrtn2VlF1NIL6HEWrkP3k1QdLHRPANyoeusCl94WXFVS6S_Jov1_OufjG3Jh8UQm6-z7L751M54Jvhdq8povE1kEGYE0HsbDVQx0b6evcTdHBoDqSo4Klznt13UO-O5_DEIR8Gy8qqXgDer5aUUkxWr8vGlCbc42qeuPj644nP7LE2Tzdy2-8Ed39EHt7Fyv9TEbLwssGyuF1rI9PQzIZs7HypmbLjDfExjKl_IvRnGqcw3n_IONJ7tDBLeh529xR6oOD8AJl0V8BNFRB9fpKbVTuFZ-uUPN_nGk3YPhVO6CctAlPjNCzKGVGsFlJMWGNAsYWFabT4rJmi3VlM4YOvuVHW3fRjgwD6uwdtUCUGw_KyV-RjAJm1SoCa0UBJA9EreoOD-xYdhqkGdiJsr9iCA6-BoDJ8VpxmQX1rC4qJTZkBIb8HnAJrFn65-WS89wFbDGoDztNFVralub0qQ4psU847wBeXP-aRF6nIy9Aac7cub9o5f9Rk0cKjt7F4MtlEQb60Zhvl8ijmRIqPsVEFD0h_uukzr1-VzDS5r_z9wgy5r0ln36seSRzpI0qCn5z9jn1IFlZkNyPky-R1ZtHGU1OluxoyekwOoVAjgPc21nQY9Gy4FTxF0HAKD49a22EETiTROpKhLOgQslh4Z0-JIo0CiXUUQArE3_z5z12AbzoAA-QiRgmPsw\" width=\"0\" height=\"0\" alt=\"\" style=\"width: 0px; height: 0px;\"><\/div>","jpf":0,"ctt":1,"as":8685254,"viu":""},"jac":"<img src=\"https:\/\/cs.gssprt.jp\/yie\/ld\/mcs?ver=1&dspid=bswit&format=gif&vid=1\" style=\"display: none; visibility: hidden;\" \/><script type=\"text\/javascript\">(function(){var vpbt_data=[{\"vtid\":138,\"vtdu\":1,\"vttg\":decodeURIComponent(\"<img style=\\\"display:none\\\" width=\\\"1\\\" height=\\\"1\\\" src=\\\"https:\\\/\\\/pixel.tapad.com\\\/idsync\\\/ex\\\/receive?partner_id=3171&partner_device_id=bbb7fd46dc7f4c90aaaffe1eafb58c1d\\\">\"),},];var w=window;if(typeof(w.__geniee_def_1399201)!=='undefined'&&w.__geniee_def_1399201!=null){w=w.__geniee_def_1399201.getDeliveryWindow();}if(typeof(w.__geniee_vpt_vtid)==='undefined'){w.__geniee_vpt_vtid=new Array();}for(var i=0;i<vpbt_data.length;i++){var f=0;if(w.__geniee_vpt_vtid.indexOf(vpbt_data[i].vtid)<0){w.__geniee_vpt_vtid.push(vpbt_data[i].vtid);f=1;}else if(vpbt_data[i].vtdu!=0){f=1;}if(f==1){document.write(vpbt_data[i].vttg);}}})();<\/script><\/div>\r\n<\/div>\r\n<script>\r\n  ((window, document) => {\r\n    const ZID = 1399201;\r\n    const gnDelivery = document.querySelector(`[id^=\"gn_delivery_${ZID}\"]`);\r\n    if (!gnDelivery) return;\r\n    const gnDeliveryInnerHTML = gnDelivery.innerHTML;\r\n    const divWrap = document.getElementById(ZID);\r\n    if (!divWrap) return;\r\n    const SIZE_CHANGE_AD_1 = [\"9062440\", \"9932585\",\"10983744\"]; \/\/ 300x360\r\n    const SIZE_CHANGE_AD_2 = [\"10716024\", \"10716025\", \"10718748\", \"10718749\"]; \/\/ 300x600\r\n    const SIZE_CHANGE_AD_3 = [\"dummy\"]; \/\/ 300x500\r\n    const ZUCKS_LARGE_AD = [\"10721114\", \"10721117\"]; \/\/ zucks 400x600\r\n    const CIRQUA_ADS = [\"10822916\", \"10822917\"]; \/\/ Cirqua\r\n    const isSizeChangeAd1 = SIZE_CHANGE_AD_1.some(function (value) { return gnDeliveryInnerHTML.indexOf(value) >= 0; });\r\n    const isSizeChangeAd2 = SIZE_CHANGE_AD_2.some(function (value) { return gnDeliveryInnerHTML.indexOf(value) >= 0; });\r\n    const isSizeChangeAd3 = SIZE_CHANGE_AD_3.some(function (value) { return gnDeliveryInnerHTML.indexOf(value) >= 0; });\r\n    const isZucksLargeAd = ZUCKS_LARGE_AD.some(function (value) { return gnDeliveryInnerHTML.indexOf(value) >= 0; });\r\n    const isCirquaAd = CIRQUA_ADS.some(function (value) {return gnDeliveryInnerHTML.indexOf(value) >= 0; });\r\n    const BANNER_WIDTH = 300;\r\n    let BANNER_HEIGHT = 250;\r\n    const screenWidth = screen.width;\r\n\r\n    if (isSizeChangeAd1) {\r\n      BANNER_HEIGHT = 360;\r\n    } else if (isSizeChangeAd2) {\r\n      BANNER_HEIGHT = 600;\r\n    } else if (isSizeChangeAd3) {\r\n      BANNER_HEIGHT = 500;\r\n    } else if (isZucksLargeAd) {\r\n      const divWrapParentWidth = divWrap.parentElement.clientWidth;\r\n      const bothSideMargin = screenWidth - divWrap.parentElement.clientWidth;\r\n      divWrap.style.width = `${screenWidth}px`;\r\n      divWrap.style.margin = `0 -${bothSideMargin \/ 2}px`;\r\n      return;\r\n    } else if (isCirquaAd) {\r\n      BANNER_HEIGHT = 333;\r\n    }\r\n\r\n    const scale = screenWidth \/ BANNER_WIDTH;\r\n    const VERTICAL_MARGIN = 15;\r\n    const vMargin = BANNER_HEIGHT * (scale - 1) * 0.5 + VERTICAL_MARGIN;\r\n    divWrap.style.width = `${BANNER_WIDTH}px`;\r\n    divWrap.style.height = `${BANNER_HEIGHT}px`;\r\n    divWrap.style.transform = `scale(${scale})`;\r\n    divWrap.style.margin = vMargin + \"px auto\";\r\n  })(window, document);\r\n<\/script>\r\n<script type=\"text\/javascript\" src=\"https:\/\/works.gsspcln.jp\/w\/ad_format\/gnScrollCatch_multi.js\"><\/script>\r\n<script>\r\n  (function(window, document){\r\n    var zid = 1399201;\r\n    var asid = 8685254;\r\n    var asidClue = \"?zid=\" + zid + \"&amp;asid=\" + asid;\r\n    var deliveryAreaId = \"gn_delivery_\" + zid + \"_\";\r\n    var targetArea = document.querySelector('div[id^=\"' + deliveryAreaId + '\"]');\r\n    var targetText = targetArea.innerHTML;\r\n    if(targetText.indexOf(asidClue) >= 0){\r\n      document.getElementById(\"gn-scroll-catch-ad1399201\").dataset[\"asid\"] = asid;\r\n      document.getElementById(\"gn-scroll-catch-ad1399201\").dataset[\"activatePercentage\"] = 100;\r\n    }\r\n  })(window, document);\r\n<\/script>","ctu":"https://aladdin.genieesspv.jp/yie/ld/cic","vie":1};gpb_1399201.run(jd);</script>
         <div class="gn_scrollCatchAd" id="gn-scroll-catch-ad1399201" data-width-value="300" data-height-value="250" data-stop-time="0.1" data-activate-percentage="100" data-use-blind="false" data-use-loading="false" style="text-align:center;" data-asid="8685254">
            <div id="1399201" style="width: 300px; height: 250px; transform: scale(1.25); margin: 46.25px auto;">
               <div id="gn_delivery_1399201_c4661218">
                  <a href="https://cs.gssprt.jp/yie/ld/ck?zid=1399201&amp;asid=8685254&amp;idx=0&amp;gid=bbb7fd46dc7f4c90aaaffe1eafb58c1d&amp;l=zLk9jo80R3tBZrWzWPzRm5jBRM2tEniMY63wHbvgnQiwEFohAJ53dP38SWOnpGQFRiZpFNDp26BA4CVLKgzlzZBlwoMlkgWpKvqSQ5DdBMQSL8D43a9klQjCfhN20i68_XIzvKcd7NtBu2IZ9ySgsemUCInXLqqsk-m3BlUlO0EvZ0BhG78H_nXwS5KOghJ_o5tFk7jXZqEs4QS4fOFqQx7WYHfkDuV2hR3nfyebCccapAHEEWqHTqcrAeh767g5av94ac80yx4KRvdWP_4HPRhKZUZOqjxEfIb57VH0giBiEWUsYomWBe6fuKFbl7B1V5eO73Scl5PToFkTMoXZ_X-4EYzURziJJsOfzJS6fbkTzArpAYaaQ1tm1mU-l8jpluDU9-s9kwUUzTlH_QzV2vr-gCNeuOFdZ8U07A_sp7rWDmb7sEX-_B7yVn0f5mhdcRzQPaU7vOScAefCXNTIoJZ_Sx43O3vN&amp;dest=https%3A%2F%2Fspnativeapi.i-mobile.co.jp%2Fapi%2Fad_link.ashx%3Fpid%3D73211%26mid%3D523463%26asid%3D1710422%26advid%3D7022575%26vh%3D2e83945d10dd14f22eed7ea32e5863ab" target="_blank"><img src="https://spcdnsp.i-mobile.co.jp/ad_creative.ashx?advid=7022575&amp;eid=15" width="300" height="250" border="0"></a>
                  <div style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img src="https://spnativeapi-tls.i-mobile.co.jp/api/ad_imp_count.ashx?pid=73211&amp;mid=523463&amp;asid=1710422&amp;advid=7022575" width="0" height="0" alt="" style="width: 0px; height: 0px;"></div>
                  <div style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img src="https://aladdin.genieesspv.jp/yie/ld/gl3?zid=1399201&amp;asid=8685254&amp;idx=0&amp;gid=bbb7fd46dc7f4c90aaaffe1eafb58c1d&amp;cb=259be333d9&amp;l=tc513Wn721v3zkDNiUONTdY1WN68uekQb4647VvqZkighlqM90QW3tDbMIv0mV8cSEt3geat2fg3QTYJmpV0IPGs60OaBs412_m_k-Xc8lARCXxtHhOtcIT3KrIaEoyqt234AJXVglW4h_aEFhWV_3e4y69dDjlOjsD4j6gbGbvU05rWtpTJj9H0hzWRPF1ds4mp9lJYVnaUVIpPl4H7mmt7BkRnry2UzCuRDTG-mtyzlOvm7_88liCQ32XGPOuPRtz9k3fKOD2Hspbfi7txrtn2VlF1NIL6HEWrkP3k1QdLHRPANyoeusCl94WXFVS6S_Jov1_OufjG3Jh8UQm6-z7L751M54Jvhdq8povE1kEGYE0HsbDVQx0b6evcTdHBoDqSo4Klznt13UO-O5_DEIR8Gy8qqXgDer5aUUkxWr8vGlCbc42qeuPj644nP7LE2Tzdy2-8Ed39EHt7Fyv9TEbLwssGyuF1rI9PQzIZs7HypmbLjDfExjKl_IvRnGqcw3n_IONJ7tDBLeh529xR6oOD8AJl0V8BNFRB9fpKbVTuFZ-uUPN_nGk3YPhVO6CctAlPjNCzKGVGsFlJMWGNAsYWFabT4rJmi3VlM4YOvuVHW3fRjgwD6uwdtUCUGw_KyV-RjAJm1SoCa0UBJA9EreoOD-xYdhqkGdiJsr9iCA6-BoDJ8VpxmQX1rC4qJTZkBIb8HnAJrFn65-WS89wFbDGoDztNFVralub0qQ4psU847wBeXP-aRF6nIy9Aac7cub9o5f9Rk0cKjt7F4MtlEQb60Zhvl8ijmRIqPsVEFD0h_uukzr1-VzDS5r_z9wgy5r0ln36seSRzpI0qCn5z9jn1IFlZkNyPky-R1ZtHGU1OluxoyekwOoVAjgPc21nQY9Gy4FTxF0HAKD49a22EETiTROpKhLOgQslh4Z0-JIo0CiXUUQArE3_z5z12AbzoAA-QiRgmPsw" width="0" height="0" alt="" style="width: 0px; height: 0px;"></div>
               </div>
               <img src="https://cs.gssprt.jp/yie/ld/mcs?ver=1&amp;dspid=bswit&amp;format=gif&amp;vid=1" style="display: none; visibility: hidden;"><script type="text/javascript">(function(){var vpbt_data=[{"vtid":138,"vtdu":1,"vttg":decodeURIComponent("<img style=\"display:none\" width=\"1\" height=\"1\" src=\"https:\/\/pixel.tapad.com\/idsync\/ex\/receive?partner_id=3171&partner_device_id=bbb7fd46dc7f4c90aaaffe1eafb58c1d\">"),},];var w=window;if(typeof(w.__geniee_def_1399201)!=='undefined'&&w.__geniee_def_1399201!=null){w=w.__geniee_def_1399201.getDeliveryWindow();}if(typeof(w.__geniee_vpt_vtid)==='undefined'){w.__geniee_vpt_vtid=new Array();}for(var i=0;i<vpbt_data.length;i++){var f=0;if(w.__geniee_vpt_vtid.indexOf(vpbt_data[i].vtid)<0){w.__geniee_vpt_vtid.push(vpbt_data[i].vtid);f=1;}else if(vpbt_data[i].vtdu!=0){f=1;}if(f==1){document.write(vpbt_data[i].vttg);}}})();</script><img style="display:none" width="1" height="1" src="https://pixel.tapad.com/idsync/ex/receive?partner_id=3171&amp;partner_device_id=bbb7fd46dc7f4c90aaaffe1eafb58c1d"><img width="0" height="0" src="https://aladdin.genieesspv.jp/yie/ld/cic?cik=wUMbeZdyK0nBwJz2UoTuhnF0bSMfkSosbY7QPaqG0U79Vw9ZtLIXPJKNA8qYuuf1Y7869U5xQzKxIodhQJzXUCgWmQQ&amp;asid=8685254" style="display: none; visibility: hidden;">
            </div>
            <div class="gn_safeArea" style="width: 100%; overflow: hidden; pointer-events: none; text-align: center; height: 0px; display: none;"></div>
            <div class="gn_safeArea" style="width: 100%; overflow: hidden; pointer-events: none; text-align: center; height: 0px;"></div>
            <div class="gn_safeArea" style="width: 100%; overflow: hidden; pointer-events: none; text-align: center; height: 0px;"></div>
         </div>
         <script>
            ((window, document) => {
              const ZID = 1399201;
              const gnDelivery = document.querySelector(`[id^="gn_delivery_${ZID}"]`);
              if (!gnDelivery) return;
              const gnDeliveryInnerHTML = gnDelivery.innerHTML;
              const divWrap = document.getElementById(ZID);
              if (!divWrap) return;
              const SIZE_CHANGE_AD_1 = ["9062440", "9932585","10983744"]; // 300x360
              const SIZE_CHANGE_AD_2 = ["10716024", "10716025", "10718748", "10718749"]; // 300x600
              const SIZE_CHANGE_AD_3 = ["dummy"]; // 300x500
              const ZUCKS_LARGE_AD = ["10721114", "10721117"]; // zucks 400x600
              const CIRQUA_ADS = ["10822916", "10822917"]; // Cirqua
              const isSizeChangeAd1 = SIZE_CHANGE_AD_1.some(function (value) { return gnDeliveryInnerHTML.indexOf(value) >= 0; });
              const isSizeChangeAd2 = SIZE_CHANGE_AD_2.some(function (value) { return gnDeliveryInnerHTML.indexOf(value) >= 0; });
              const isSizeChangeAd3 = SIZE_CHANGE_AD_3.some(function (value) { return gnDeliveryInnerHTML.indexOf(value) >= 0; });
              const isZucksLargeAd = ZUCKS_LARGE_AD.some(function (value) { return gnDeliveryInnerHTML.indexOf(value) >= 0; });
              const isCirquaAd = CIRQUA_ADS.some(function (value) {return gnDeliveryInnerHTML.indexOf(value) >= 0; });
              const BANNER_WIDTH = 300;
              let BANNER_HEIGHT = 250;
              const screenWidth = screen.width;

              if (isSizeChangeAd1) {
                BANNER_HEIGHT = 360;
              } else if (isSizeChangeAd2) {
                BANNER_HEIGHT = 600;
              } else if (isSizeChangeAd3) {
                BANNER_HEIGHT = 500;
              } else if (isZucksLargeAd) {
                const divWrapParentWidth = divWrap.parentElement.clientWidth;
                const bothSideMargin = screenWidth - divWrap.parentElement.clientWidth;
                divWrap.style.width = `${screenWidth}px`;
                divWrap.style.margin = `0 -${bothSideMargin / 2}px`;
                return;
              } else if (isCirquaAd) {
                BANNER_HEIGHT = 333;
              }

              const scale = screenWidth / BANNER_WIDTH;
              const VERTICAL_MARGIN = 15;
              const vMargin = BANNER_HEIGHT * (scale - 1) * 0.5 + VERTICAL_MARGIN;
              divWrap.style.width = `${BANNER_WIDTH}px`;
              divWrap.style.height = `${BANNER_HEIGHT}px`;
              divWrap.style.transform = `scale(${scale})`;
              divWrap.style.margin = vMargin + "px auto";
            })(window, document);
         </script>
         <script type="text/javascript" src="https://works.gsspcln.jp/w/ad_format/gnScrollCatch_multi.js"></script>
         <script>
            (function(window, document){
              var zid = 1399201;
              var asid = 8685254;
              var asidClue = "?zid=" + zid + "&amp;asid=" + asid;
              var deliveryAreaId = "gn_delivery_" + zid + "_";
              var targetArea = document.querySelector('div[id^="' + deliveryAreaId + '"]');
              var targetText = targetArea.innerHTML;
              if(targetText.indexOf(asidClue) >= 0){
                document.getElementById("gn-scroll-catch-ad1399201").dataset["asid"] = asid;
                document.getElementById("gn-scroll-catch-ad1399201").dataset["activatePercentage"] = 100;
              }
            })(window, document);
         </script><script type="text/javascript">!function(){"use strict";var e;e=String(""),function(){var n,i=0;if(void 0!==window.__geniee_open_safari&&null!=window.__geniee_open_safari&&1==window.__geniee_open_safari&&1==i){window.__geniee_open_safari=0;var o=document.getElementsByTagName("script"),r=o[o.length-1].parentNode,a=null;if(window.parent==window.self)for(;null!=r&&r!=document.documentElement&&r!=document.body;){if(1==r.nodeType&&"DIV"==r.nodeName){a=r;break}r=r.parentNode}else for(;null!=r&&r!=document.documentElement;){if(1==r.nodeType&&"BODY"==r.nodeName){a=r;break}r=r.parentNode}null!=a&&(n=e+"=",function e(i){for(var o=i.firstChild;null!=o;o=o.nextSibling)if(1==o.nodeType){if("A"==o.nodeName){var r=o.href;if(null!=r&&""!=r){var a="",t="",d="",f=r.indexOf("?");if(f>=0){a=r.substring(0,f);var l=r.indexOf("#",f+1);l>=0?(t=r.substring(f+1,l),d=r.substring(l+1)):t=r.substring(f+1)}else a=r;if(""!=t){var s=t.toLowerCase().indexOf(n);if(0==s||s>0&&"&"==t.charAt(s-1))continue;t+="&"+n+"1"}else t=n+"1";r=a,""!=t&&(r+="?"+t,""!=d&&(r+="#"+d)),r=r.replace("?=1","").replace("&=1",""),o.href=r}}"SCRIPT"!=o.nodeName&&e(o)}}(a))}}()}();</script>
      </div>
   </div>
</div>
```
</div></details>

注目すべきなのがここです。

```HTML
<div class="gn_scrollCatchAd" id="gn-scroll-catch-ad1399201" data-width-value="300" data-height-value="250" data-stop-time="0.1" data-activate-percentage="100" data-use-blind="false" data-use-loading="false" style="text-align:center;" data-asid="8685254">
```

この広告の名前なのですが、なんと `gn_scrollCatchAd` です。**もはや隠す気すらない**。

そして、さっきお見せした地獄みたいなスクロールの源が恐らくこちらです。

```HTML
<script type="text/javascript" src="https://works.gsspcln.jp/w/ad_format/gnScrollCatch_multi.js"></script>
```

中身を見てみましょう。先ほどと同じく、全部読む必要はないです。

<details><summary>gnScrollCatch_multi.js</summary><div>

```javascript
(function(topWindow, topDocument, currentWindow, currentDocument){

  var isInAccesibleIframe = topWindow !== currentWindow;
  var outerIframe = getOuterIframe();

  topWindow.addEventListener("load", function(){
    var tgt = currentDocument.getElementsByClassName("gn_scrollCatchAd");
    var tgtl = tgt.length;

    var catchUseArray = Array(tgtl);
    var adBlindUseArray = Array(tgtl);
    var adLoadingUseArray = Array(tgtl);

    var stopLine = "gad_scrollCatchPos";
    var nextStopLine = "scrollCatchCurrent";

    for(var i=0;i<tgtl;i++){
      catchUseArray[i] = isDiceLimitaion(parseInt(tgt[i].dataset["activatePercentage"]));
      if(catchUseArray[i]){
        adBlindUseArray[i] = tgt[i].dataset["useBlind"];
        adLoadingUseArray[i] = tgt[i].dataset["useLoading"];
        tgt[i].classList.add(stopLine);
      }else{
        adBlindUseArray[i] = false;
        adLoadingUseArray[i] = false;
      }

      addSafeFrame(tgt, i, adBlindUseArray[i], adLoadingUseArray[i]);
    }

    //確率によりスクロール一時停止を実行するかどうか
    if(catchUseArray.indexOf(true) < 0) return;

    var scrollCatchArea = currentDocument.getElementsByClassName(stopLine)[0];
    scrollCatchArea.classList.add(nextStopLine);
    var stopBorderElement = isInAccesibleIframe ? outerIframe : scrollCatchArea;
    var catchPosY = stopPositionCalculate(stopBorderElement, scrollCatchArea.dataset["heightValue"]);

    var currentSafeArea = topDocument.getElementsByClassName("gn_safeArea")[0];

    topWindow.addEventListener("scroll", function(e){
      scrollCatchArea = currentDocument.getElementsByClassName(stopLine)[0];
      var current = scrollCatchArea;
      if(current) var currentSafeArea = current.getElementsByClassName("gn_safeArea")[0] ? current.getElementsByClassName("gn_safeArea")[0] : null;
      if(currentSafeArea && isInAccesibleIframe) currentSafeArea = outerIframe.parentNode.getElementsByClassName("gn_safeArea")[0];
      if(scrollCatchArea){
        scrollCatchArea.classList.add(nextStopLine);
      var stopTime = parseFloat(scrollCatchArea.dataset["stopTime"]);
      var sc_top = (topDocument.scrollingElement || topDocument.documentElement).scrollTop;
        if(catchPosY <= sc_top && scrollCatchArea.className.indexOf(nextStopLine) >= 0){
          topWindow.scrollTo(0,catchPosY);
          setTimeout(function(){
            current.classList.remove(stopLine);
            if(currentSafeArea) currentSafeArea.style.display = "none";
            scrollCatchArea = currentDocument.getElementsByClassName(stopLine)[0];
            current.classList.remove(nextStopLine);
            if(scrollCatchArea){
              catchPosY = stopPositionCalculate(stopBorderElement, scrollCatchArea.dataset["heightValue"]);
              stopBorderElement = isInAccesibleIframe ? outerIframe : scrollCatchArea;
            }
          }, stopTime * 1000);
        }
      }
    }, false);
  }, false);

  function isDiceLimitaion(deliveryProbability) {
    var diceDot = Math.floor(Math.random() * 100) + 1;
    return diceDot <= deliveryProbability;
  }

  function stopPositionCalculate(target, adHeight) {
    return getAbsoluteYCoordinate(target) - adjustmentForDisplayAdOnCenter(adHeight);
  }

  function getAbsoluteYCoordinate(target) {
    return topWindow.pageYOffset + target.getBoundingClientRect().top;
  }

  function adjustmentForDisplayAdOnCenter(adHeight) {
    return (screen.height - adHeight) * 0.5
  }

  function getOuterIframe() {
    if (topWindow === currentWindow) {
      return null;
    }

    var searchingWindow = currentWindow;
    while (searchingWindow.parent !== topWindow) {
      searchingWindow = searchingWindow.parent;
    }
    return searchingWindow.frameElement;
  }

  function addSafeFrame(target, j, useArray, useLoading){
    var safeArea = document.createElement("div");
      safeArea.setAttribute("class", "gn_safeArea");
      safeArea.setAttribute("style", "width: 100%; overflow: hidden; pointer-events: none; text-align: center;");
      if (isInAccesibleIframe) {
        // iframeの下につける
        outerIframe.parentNode.insertBefore(safeArea, outerIframe.nextSibling);
      } else {
        target[j].appendChild(safeArea);
      }
      if(useArray === "true"){
        safeArea.style.height = screen.height + "px";
        if(useLoading === "true"){
          var pauseTime = currentDocument.createElement("img");
          pauseTime.setAttribute("style", "margin-top: 20px;");
          pauseTime.setAttribute("src", "https://js.gsspcln.jp/i/35.gif");
          safeArea.style.backgroundColor = "#f0f0f0";
          safeArea.appendChild(pauseTime);
        }
      }else safeArea.style.height = "0px";
  }

})(window.top, window.top.document, window, document);
```
</div></details>

このコードにはこんなコメントが含まれています。

```javascript
//確率によりスクロール一時停止を実行するかどうか
```

<font color="red"><b>やっぱ故意犯じゃねえか！（全ギレ）</b></font>

諸悪の根源が恐らくここです。なおこちらは適宜リファクタを行ったり省略してたりするので、オリジナルのコードは上の折り畳みの中を参照してください。

:::note warn
筆者は HTML も javascript もド素人なので、以下のコメントには多分に憶測が含まれます。マサカリ大歓迎です。
:::

```javascript
window.top.addEventListener("scroll", (_) => {
  /* Pos が "Position" の意だとすれば、スクロールを停止させる位置の要素ということか？ */
  scrollCatchArea = document.getElementsByClassName("gad_scrollCatchPos")[0];
  /*（中略）*/
  scrollCatchArea?.classList.add("scrollCatchCurrent");

  /* たぶん「広告が一定以上スクロールされたら」みたいな条件だろう（憶測） */
  var sc_top = (window.top.document.scrollingElement || window.top.document.documentElement).scrollTop;
  if (catchPosY <= sc_top && scrollCatchArea?.className.includes("scrollCatchCurrent")) {
    /* 強制的に catchPosY までスクロールする */
    window.top.scrollTo(0, catchPosY);

    /* あらかじめ決められた時間 (scrollCatchArea.dataset["stopTime"]) 経過したら解除する */
    setTimeout(() => {
      scrollCatchArea?.classList.remove("gad_scrollCatchPos");
      /*（中略）*/
      scrollCatchArea = document.getElementsByClassName("gad_scrollCatchPos")[0];
      /* ここの処理によって上の if 文の条件が満たされなくなり、強制スクロールが起こらなくなる？？？ */
      scrollCatchArea?.classList.remove("scrollCatchCurrent");
      catchPosY = stopPositionCalculate(stopBorderElement, scrollCatchArea?.dataset["heightValue"]);
      stopBorderElement = window.top !== window ? outerIframe : scrollCatchArea;
    }, parseFloat(scrollCatchArea?.dataset["stopTime"]) * 1000);
  }
});
```

というわけで、一定時間強制的にスクロールを止めるのはほぼ間違いなく意図的に仕組まれた動作だと思われます。

# 所見
スワイプ広告の解析をなさっていた[元記事](https://qiita.com/huzisuke/items/cdc63b4bf9d2ded5b5ca)の方では「誤タップを誘発することでアクセス数を稼いでいるのではないか」と考察されていましたが、今回のスクロール妨害広告では誤タップによるアクセス数は稼げないので、別の理由がありそうです。

一つ考えられるとすれば「無理やりにでもユーザーの視界に入り、広告を見てもらう」ということでしょうか。スマートフォンも普及して久しく、ほとんどの人は広告など「無意識のうちに」スルーしながらネットサーフィンをしていることと思います。私自身もそうです。ですからより効果的な広告を作り出す必要があるというのはわかります。

しかしこれは @huzisuke 様も指摘されていることではありますが、このような広告はユーザビリティを損ない、広告主のブランド価値をも下げてしまいます。

またこのような広告が増えれば増えるほど AdBlock を始めとする広告ブロッカーの需要が高まってしまい、まわりまわって結局は広告業者の方々が困ることになります。

私は広告というものはとても貴重なセレンディピティをもたらしてくれるものだと考えているので、広告ブロッカーは極力使いたくありません。ですからこのようにユーザビリティを著しく損ねるような広告は本当にやめていただきたいですし残念です。ユーザに感動や喜びを感じさせるような広告が増えることを願っております。