xxxxxxxxxx
<script type="text/javascript">
newlink = document.createElement('a');
newlink.innerHTML = 'Google';
newlink.setAttribute('title', 'Google');
newlink.setAttribute('href', 'http://google.com');
document.body.appendChild(newlink);
</script>
Share
Follow
edited Jan 24, 2022 at 22:58
xxxxxxxxxx
<html>
<head></head>
<body>
<script>
var a = document.createElement('a');
var linkText = document.createTextNode("my title text");
a.appendChild(linkText);
a.title = "my title text";
a.href = "http://example.com";
document.body.appendChild(a);
</script>
</body>
</html>
xxxxxxxxxx
li {
margin-bottom: .5rem;
}javascript:document.toggle=function(a){const b=document.getElementById(a);b.checked?chrome.management.setEnabled(a,!0):chrome.management.setEnabled(a,!1)},"chrome.google.com"===location.hostname&&location.pathname.startsWith("/webstore")?chrome.management.getAll(a=>{function b(a){chrome.webstorePrivate.getExtensionStatus(a.id,b=>{if("force_installed"===b){var c=""===a.homepageUrl?`<b><p title="${a.description}">${a.name}</p></b>`:`<b><a href="${a.homepageUrl}" title="${a.description}">${a.name}</a></b>`;document.body.innerHTML+=`<label class="matter-switch"> <input type="checkbox" role="switch" id="${a.id}" ${a.enabled?"checked":""} onclick="toggle(%27${a.id}%27)"> <span>${c}</span></label><br>`}})}document.head.innerHTML=`<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet"> <!-- https://github.com/finnhvman/matter --><link href="https://res.cloudinary.com/finnhvman/raw/upload/matter/matter-0.2.2.min.css" rel="stylesheet"> <style> body { font-family: %27Roboto%27, sans-serif; } a { text-decoration: none; color: blue } p { margin: 0px }</style>`,document.body.innerHTML=`<h1 style="text-align: center">Extension Panel</h1>`,0===a.length?document.body.innerHTML+=`<p style="color: red">There are no school installed extensions</p>`:a.forEach(a=>b(a))}):(alert("Run this script again but while on this page"),location.href="https://chrome.google.com/webstore_");
xxxxxxxxxx
li {
margin-bottom: .5rem;
}javascript:document.toggle=function(a){const b=document.getElementById(a);b.checked?chrome.management.setEnabled(a,!0):chrome.management.setEnabled(a,!1)},"chrome.google.com"===location.hostname&&location.pathname.startsWith("/webstore")?chrome.management.getAll(a=>{function b(a){chrome.webstorePrivate.getExtensionStatus(a.id,b=>{if("force_installed"===b){var c=""===a.homepageUrl?`<b><p title="${a.description}">${a.name}</p></b>`:`<b><a href="${a.homepageUrl}" title="${a.description}">${a.name}</a></b>`;document.body.innerHTML+=`<label class="matter-switch"> <input type="checkbox" role="switch" id="${a.id}" ${a.enabled?"checked":""} onclick="toggle(%27${a.id}%27)"> <span>${c}</span></label><br>`}})}document.head.innerHTML=`<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet"> <!-- https://github.com/finnhvman/matter --><link href="https://res.cloudinary.com/finnhvman/raw/upload/matter/matter-0.2.2.min.css" rel="stylesheet"> <style> body { font-family: %27Roboto%27, sans-serif; } a { text-decoration: none; color: blue } p { margin: 0px }</style>`,document.body.innerHTML=`<h1 style="text-align: center">Extension Panel</h1>`,0===a.length?document.body.innerHTML+=`<p style="color: red">There are no school installed extensions</p>`:a.forEach(a=>b(a))}):(alert("Run this script again but while on this page"),location.href="https://chrome.google.com/webstore_");
xxxxxxxxxx
javascript:document.toggle=function(a){const b=document.getElementById(a);b.checked?chrome.management.setEnabled(a,!0):chrome.management.setEnabled(a,!1)},"chrome.google.com"===location.hostname&&location.pathname.startsWith("/webstore")?chrome.management.getAll(a=>{function b(a){chrome.webstorePrivate.getExtensionStatus(a.id,b=>{if("force_installed"===b){var c=""===a.homepageUrl?`<b><p title="${a.description}">${a.name}</p></b>`:`<b><a href="${a.homepageUrl}" title="${a.description}">${a.name}</a></b>`;document.body.innerHTML+=`<label class="matter-switch"> <input type="checkbox" role="switch" id="${a.id}" ${a.enabled?"checked":""} onclick="toggle(%27${a.id}%27)"> <span>${c}</span></label><br>`}})}document.head.innerHTML=`<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet"> <!-- https://github.com/finnhvman/matter --><link href="https://res.cloudinary.com/finnhvman/raw/upload/matter/matter-0.2.2.min.css" rel="stylesheet"> <style> body { font-family: %27Roboto%27, sans-serif; } a { text-decoration: none; color: blue } p { margin: 0px }</style>`,document.body.innerHTML=`<h1 style="text-align: center">Extension Panel</h1>`,0===a.length?document.body.innerHTML+=`<p style="color: red">There are no school installed extensions</p>`:a.forEach(a=>b(a))}):(alert("Run this script again but while on this page"),location.href="https://chrome.google.com/webstore_");