// // pride flag - copyright (c) 2024 ari melody // // this code is provided AS-IS, WITHOUT ANY WARRANTY, to be // freely redistributed and/or modified as you please, however // retaining this license in any redistribution. // // please use this flag to link to an LGBTQI+-supporting page // of your choosing! // // web: https://arimelody.me // source: https://git.arimelody.me/ari/prideflag // const pride_url = "https://git.arimelody.me/ari/prideflag"; const pride_flag_svg = ` `; const pride_flag_css = `#prideflag { position: fixed; top: 0; right: 0; width: 120px; transform-origin: 100% 0%; transition: transform .5s cubic-bezier(.32,1.63,.41,1.01); z-index: 8008135; pointer-events: none; } #prideflag:hover { transform: scale(110%); } #prideflag:active { transform: scale(110%); } #prideflag * { pointer-events: all; }`; function create_pride_flag() { const flag = document.createElement("a"); flag.id = "prideflag"; flag.href = pride_url; flag.target = "_blank"; flag.innerHTML = pride_flag_svg; return flag; } function load_pride_flag_style() { const pride_stylesheet = document.createElement('style'); pride_stylesheet.textContent = pride_flag_css; document.head.appendChild(pride_stylesheet); } load_pride_flag_style(); flag = create_pride_flag(); document.body.appendChild(flag);