Cloudflare-Blocker/blocked.js

23 lines
661 B
JavaScript

function getUrlParams() {
const urlParams = new URLSearchParams(window.location.search);
return {
name: urlParams.get('name'),
value: urlParams.get('value'),
url: urlParams.get('url')
};
}
document.addEventListener('DOMContentLoaded', function() {
const params = getUrlParams();
if (params.name) {
const header_info = `Name: ${params.name}\nValue: ${params.value || ''}`;
document.getElementById('header_info').textContent = header_info;
}
if (params.url) {
document.getElementById('url').textContent = params.url;
document.getElementById('wayback').href =
'https://web.archive.org/web/' + params.url;
}
});