SHOW:
|
|
- or go back to the newest paste.
| 1 | 1. Please paste this code after <main class="content-single"> tag as first child: | |
| 2 | ||
| 3 | <div id="DIV_0"></div> | |
| 4 | <div id="DIV_1" class="overlay-panel"> | |
| 5 | <div class="inner"> | |
| 6 | <div class="msg-container"> | |
| 7 | <img class="msglogo" src="https://medianet.adlabsnetworks.com/public/demo/dni-peru.com/dni-logo.png" | |
| 8 | width="440" height="66"> | |
| 9 | <p class="msg"> | |
| 10 | Para ver los resultados<br>Ver un anuncio corto. | |
| 11 | </p> | |
| 12 | <button id="BUTTON_11" class="button cmdL0">CONTINUAR</button> | |
| 13 | </div> | |
| 14 | </div> | |
| 15 | </div> | |
| 16 | <style> | |
| 17 | #DIV_0 {
| |
| 18 | position: absolute; | |
| 19 | height: 100%; | |
| 20 | width: 100%; | |
| 21 | opacity: .9; | |
| 22 | background-color: #fff; | |
| 23 | z-index: 2147483648; | |
| 24 | display: none | |
| 25 | } | |
| 26 | ||
| 27 | ||
| 28 | #DIV_1 .inner {
| |
| 29 | position: relative | |
| 30 | } | |
| 31 | ||
| 32 | .inner {
| |
| 33 | top: 150px !important | |
| 34 | } | |
| 35 | ||
| 36 | #DIV_1 .msg-container {
| |
| 37 | display: flex; | |
| 38 | justify-content: space-around; | |
| 39 | flex-direction: column | |
| 40 | } | |
| 41 | ||
| 42 | #DIV_1 .msg {
| |
| 43 | text-align: center; | |
| 44 | font-weight: 700; | |
| 45 | line-height: 1.2em; | |
| 46 | color: #069; | |
| 47 | margin-top: 40px | |
| 48 | } | |
| 49 | ||
| 50 | #BUTTON_11 {
| |
| 51 | margin: 0 auto; | |
| 52 | margin-top: 2rem; | |
| 53 | padding: 1rem !important | |
| 54 | } | |
| 55 | ||
| 56 | .overlay-panel {
| |
| 57 | position: fixed; | |
| 58 | display: none; | |
| 59 | background: #fff; | |
| 60 | border: 2px solid #2563eb; | |
| 61 | padding: 6em; | |
| 62 | border-color: hsl(200 31% 28%); | |
| 63 | box-shadow: 0 0 1px 1px #0897de, 0 0 1px 3px rgb(0 0 0 / 15%); | |
| 64 | border-radius: 5px | |
| 65 | } | |
| 66 | ||
| 67 | #DIV_1 {
| |
| 68 | z-index: 2147483649; | |
| 69 | box-sizing: border-box; | |
| 70 | display: none | |
| 71 | } | |
| 72 | ||
| 73 | #DIV_1, | |
| 74 | #DIV_1 .inner {
| |
| 75 | top: 50%; | |
| 76 | left: 50%; | |
| 77 | transform: translate(-50%, -50%) | |
| 78 | } | |
| 79 | </style> | |
| 80 | ||
| 81 | 2. Please paste this code after <head> opening tag: | |
| 82 | ||
| 83 | <script type= text/javascript> | |
| 84 | var aRewardedTry=0; | |
| 85 | window.googletag = window.googletag || {cmd: []};
| |
| 86 | var googletag = window.googletag || {cmd: []};
| |
| 87 | var aRewardedCall = function(){
| |
| 88 | var searchbutton = Array.from(document.querySelectorAll('button[type="submit"]'))
| |
| 89 | .find(el => el.textContent === 'Consultar'); | |
| 90 | var watchbutton = document.getElementById('BUTTON_11');
| |
| 91 | if(typeof(searchbutton !="undefined")){
| |
| 92 | ||
| 93 | searchbutton.classList.add("cl_rewarded");
| |
| 94 | function insertAfter(el, referenceNode) {
| |
| 95 | referenceNode.parentNode.insertBefore(el, referenceNode.nextSibling); | |
| 96 | } | |
| 97 | var searchform = document.querySelector('form[method="post"]');
| |
| 98 | ||
| 99 | googletag.cmd.push(function(){
| |
| 100 | var aRewarded = 0; | |
| 101 | var rewardedSlot = googletag.defineOutOfPageSlot('/45470634,23118893940/clickio_area_715597_970x250',googletag.enums.OutOfPageFormat.REWARDED).addService(googletag.pubads());
| |
| 102 | googletag.enableServices(); | |
| 103 | googletag.pubads().addEventListener('rewardedSlotReady', function(evt) {
| |
| 104 | document.querySelector('.cl_rewarded').addEventListener('click', function(event) {
| |
| 105 | insertAfter(searchbutton, searchform); | |
| 106 | document.getElementById('DIV_0').style.display='block';
| |
| 107 | ||
| 108 | document.getElementById('DIV_1').style.display='block';
| |
| 109 | ||
| 110 | ||
| 111 | watchbutton.onclick = function(){
| |
| 112 | googletag.cmd.push(function() {
| |
| 113 | evt.makeRewardedVisible(); | |
| 114 | }); | |
| 115 | } | |
| 116 | }, {once: true});
| |
| 117 | ||
| 118 | }); | |
| 119 | googletag.pubads().addEventListener('rewardedSlotClosed', function(evt) {
| |
| 120 | ||
| 121 | searchform.append(searchbutton); | |
| 122 | searchbutton.classList.remove("cl_rewarded");
| |
| 123 | searchbutton.click(); | |
| 124 | document.getElementById('DIV_0').style.display='none';
| |
| 125 | document.getElementById('DIV_1').style.display='none';
| |
| 126 | }); | |
| 127 | //googletag.pubads().refresh([rewardedSlot]); | |
| 128 | googletag.display(rewardedSlot); | |
| 129 | }); | |
| 130 | } | |
| 131 | else {
| |
| 132 | if(aRewardedTry<=4){ setTimeout(function(){ aRewardedCall(); },500); aRewardedTry++; }
| |
| 133 | } | |
| 134 | } | |
| 135 | aRewardedCall(); | |
| 136 | </script> |