-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjavascript_v1.js
42 lines (33 loc) · 1.34 KB
/
javascript_v1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Create the new div element
var newDiv = document.createElement("div");
newDiv.className = "hero-background-gradient";
// Find the target div by its class name
var targetDiv = document.querySelector(".gc-c-ejKCwK-idfGVbC-css");
if (targetDiv) {
// Insert the new div before the target div
targetDiv.parentNode.insertBefore(newDiv, targetDiv);
}
// Create the new anchor element
var newAnchor = document.createElement("a");
newAnchor.href = "/";
newAnchor.className = "new-site-title";
newAnchor.textContent = "St. Anthony of Padua";
// Find the target div by its class name
var targetDiv = document.querySelector(".navbar-left.variant-expanded");
if (targetDiv) {
// Append the new anchor as the last element inside the target div
targetDiv.appendChild(newAnchor);
}
// Create the new div element
var newDiv3 = document.createElement("div");
newDiv3.className = "hero-logo";
// Find the target div using the compound class selector
var targetDiv3 = document.querySelector(".gc-c-dhzjXW.gc-c-iTKOFX");
if (targetDiv3) {
// Insert the new div as the first child inside the target div
if (targetDiv3.firstChild) {
targetDiv3.insertBefore(newDiv3, targetDiv3.firstChild);
} else {
targetDiv3.appendChild(newDiv3);
}
}