-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
1 lines (1 loc) · 2.56 KB
/
main.js
1
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){let n=document.querySelector("image-figure");n||(n=document.createElement("image-figure"),document.body.appendChild(n)),mybutton=document.getElementById("myBtn"),window.onscroll=()=>{o()};const o=()=>{document.body.scrollTop>20||document.documentElement.scrollTop>20?mybutton.style.display="block":mybutton.style.display="none"},r=document.querySelectorAll(".button");for(let e of r)e.addEventListener("click",(function(e){const t=e.target;t.classList.contains("button2")?l():t.classList.contains("button1")&&i()}));const l=()=>{let e=document.getElementById("flexProfileContent");e.parentNode.removeChild(e);let t=document.createElement("div");t.setAttribute("class","profileContent"),t.setAttribute("id","newDetail"),t.innerHTML='\n <h3>Informasi Lainnya</h3>\n <table align="center" border="1">\n <tr>\n <th>Tanggal lahir</th>\n <td>19 Juli 1997</td>\n </tr>\n <tr>\n <th>Lulusan</th>\n <td>Universitas Telkom</td>\n </tr>\n <tr>\n <th>Jurusan</th>\n <td>S1 Teknik Elektro</td>\n </tr>\n <tr>\n <th>Nomor Telepon</th>\n <td>+62-822-1832-8615</td>\n </tr>\n </table>',document.getElementById("flexProfile").appendChild(t)},i=()=>{let e=document.getElementById("newDetail");e.parentNode.removeChild(e);let t=document.createElement("div");t.setAttribute("class","profileContent"),t.setAttribute("id","flexProfileContent"),t.innerHTML='\n <p>Gora Asep Setiana</p>\n <image-figure src="assets/image/1102150086.jpg" caption="Lokasi: Alun-alun Kota Bandung">\n </image-figure>',document.getElementById("flexProfile").appendChild(t)}}]);