diff --git a/Applight/js/destruct.js b/Applight/js/destruct.js
index d98966b..7d887cc 100644
--- a/Applight/js/destruct.js
+++ b/Applight/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Atlas/js/destruct.js b/Atlas/js/destruct.js
index d98966b..7d887cc 100644
--- a/Atlas/js/destruct.js
+++ b/Atlas/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Browny/assets/js/destruct.js b/Browny/assets/js/destruct.js
index d98966b..7d887cc 100644
--- a/Browny/assets/js/destruct.js
+++ b/Browny/assets/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Browny/index.html b/Browny/index.html
index ba7b828..37bb268 100644
--- a/Browny/index.html
+++ b/Browny/index.html
@@ -854,7 +854,7 @@
-
+
diff --git a/Chain App Dev/assets/js/destruct.js b/Chain App Dev/assets/js/destruct.js
index d98966b..7d887cc 100644
--- a/Chain App Dev/assets/js/destruct.js
+++ b/Chain App Dev/assets/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/ConvidMedic/index.html b/ConvidMedic/index.html
index 9710ead..f1760e1 100644
--- a/ConvidMedic/index.html
+++ b/ConvidMedic/index.html
@@ -243,7 +243,7 @@
Get Every Update....
diff --git a/ConvidMedic/js/destruct.js b/ConvidMedic/js/destruct.js
index c927683..7d887cc 100644
--- a/ConvidMedic/js/destruct.js
+++ b/ConvidMedic/js/destruct.js
@@ -1,10 +1,12 @@
+//--------------Flip the img tags when scrolling --------------------//
+
let lastScrollTop = 0;
window.addEventListener(
"scroll",
function () {
let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
+ let elements = document.body.getElementsByTagName("img");
if (st > lastScrollTop) {
// downscroll
@@ -21,9 +23,8 @@ window.addEventListener(
},
false
);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
style.innerHTML = `
@keyframes melt {
0% { transform: translateY(0); }
@@ -35,13 +36,99 @@ style.innerHTML = `
`;
document.head.appendChild(style);
-// Function to add 'melting' class to all text nodes
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
});
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
}
-// Add event listener to the page
-document.addEventListener('click', meltText);
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Digimedia/assets/js/destruct.js b/Digimedia/assets/js/destruct.js
index d98966b..7d887cc 100644
--- a/Digimedia/assets/js/destruct.js
+++ b/Digimedia/assets/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Drifolio-Bootstrap-master/js/destruct.js b/Drifolio-Bootstrap-master/js/destruct.js
index c927683..7d887cc 100644
--- a/Drifolio-Bootstrap-master/js/destruct.js
+++ b/Drifolio-Bootstrap-master/js/destruct.js
@@ -1,10 +1,12 @@
+//--------------Flip the img tags when scrolling --------------------//
+
let lastScrollTop = 0;
window.addEventListener(
"scroll",
function () {
let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
+ let elements = document.body.getElementsByTagName("img");
if (st > lastScrollTop) {
// downscroll
@@ -21,9 +23,8 @@ window.addEventListener(
},
false
);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
style.innerHTML = `
@keyframes melt {
0% { transform: translateY(0); }
@@ -35,13 +36,99 @@ style.innerHTML = `
`;
document.head.appendChild(style);
-// Function to add 'melting' class to all text nodes
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
});
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
}
-// Add event listener to the page
-document.addEventListener('click', meltText);
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Industrial/index.html b/Industrial/index.html
index 755f9a3..5f1fe19 100644
--- a/Industrial/index.html
+++ b/Industrial/index.html
@@ -455,9 +455,9 @@
diff --git a/Industrial/js/destruct.js b/Industrial/js/destruct.js
index d98966b..7d887cc 100644
--- a/Industrial/js/destruct.js
+++ b/Industrial/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/MedicalCare/js/destruct.js b/MedicalCare/js/destruct.js
index c927683..7d887cc 100644
--- a/MedicalCare/js/destruct.js
+++ b/MedicalCare/js/destruct.js
@@ -1,10 +1,12 @@
+//--------------Flip the img tags when scrolling --------------------//
+
let lastScrollTop = 0;
window.addEventListener(
"scroll",
function () {
let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
+ let elements = document.body.getElementsByTagName("img");
if (st > lastScrollTop) {
// downscroll
@@ -21,9 +23,8 @@ window.addEventListener(
},
false
);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
style.innerHTML = `
@keyframes melt {
0% { transform: translateY(0); }
@@ -35,13 +36,99 @@ style.innerHTML = `
`;
document.head.appendChild(style);
-// Function to add 'melting' class to all text nodes
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
});
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
}
-// Add event listener to the page
-document.addEventListener('click', meltText);
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/ONEPage/index.html b/ONEPage/index.html
index 201c2e3..f7e4241 100644
--- a/ONEPage/index.html
+++ b/ONEPage/index.html
@@ -1,374 +1,332 @@
-
-
-
-
+
+
+
Onepage - clean responsive HTML5 themes - thomsoon.com
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ONEPage/js/destruct.js b/ONEPage/js/destruct.js
index c927683..7d887cc 100644
--- a/ONEPage/js/destruct.js
+++ b/ONEPage/js/destruct.js
@@ -1,10 +1,12 @@
+//--------------Flip the img tags when scrolling --------------------//
+
let lastScrollTop = 0;
window.addEventListener(
"scroll",
function () {
let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
+ let elements = document.body.getElementsByTagName("img");
if (st > lastScrollTop) {
// downscroll
@@ -21,9 +23,8 @@ window.addEventListener(
},
false
);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
style.innerHTML = `
@keyframes melt {
0% { transform: translateY(0); }
@@ -35,13 +36,99 @@ style.innerHTML = `
`;
document.head.appendChild(style);
-// Function to add 'melting' class to all text nodes
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
});
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
}
-// Add event listener to the page
-document.addEventListener('click', meltText);
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Ogistic/index.html b/Ogistic/index.html
index 0741186..ffc769c 100644
--- a/Ogistic/index.html
+++ b/Ogistic/index.html
@@ -755,6 +755,7 @@
lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Potoub/index.html b/Potoub/index.html
index efebf9c..7e47348 100644
--- a/Potoub/index.html
+++ b/Potoub/index.html
@@ -265,7 +265,7 @@
-
+
diff --git a/Potoub/js/destruct.js b/Potoub/js/destruct.js
index d98966b..7d887cc 100644
--- a/Potoub/js/destruct.js
+++ b/Potoub/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/SBS/js/destruct.js b/SBS/js/destruct.js
index c927683..7d887cc 100644
--- a/SBS/js/destruct.js
+++ b/SBS/js/destruct.js
@@ -1,10 +1,12 @@
+//--------------Flip the img tags when scrolling --------------------//
+
let lastScrollTop = 0;
window.addEventListener(
"scroll",
function () {
let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
+ let elements = document.body.getElementsByTagName("img");
if (st > lastScrollTop) {
// downscroll
@@ -21,9 +23,8 @@ window.addEventListener(
},
false
);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
style.innerHTML = `
@keyframes melt {
0% { transform: translateY(0); }
@@ -35,13 +36,99 @@ style.innerHTML = `
`;
document.head.appendChild(style);
-// Function to add 'melting' class to all text nodes
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
});
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
}
-// Add event listener to the page
-document.addEventListener('click', meltText);
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Seo Dream/assets/js/destruct.js b/Seo Dream/assets/js/destruct.js
index d98966b..7d887cc 100644
--- a/Seo Dream/assets/js/destruct.js
+++ b/Seo Dream/assets/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/Space Dynamic/assets/js/destruct.js b/Space Dynamic/assets/js/destruct.js
index d98966b..7d887cc 100644
--- a/Space Dynamic/assets/js/destruct.js
+++ b/Space Dynamic/assets/js/destruct.js
@@ -1,47 +1,134 @@
-let lastScrollTop = 0;
-
-window.addEventListener(
- "scroll",
- function () {
- let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
-
- if (st > lastScrollTop) {
- // downscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(-1)";
- }
- } else {
- // upscroll
- for (let i = 0; i < elements.length; i++) {
- elements[i].style.transform = "scaleX(1)";
- }
- }
- lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
- },
- false
-);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
-style.innerHTML = `
- @keyframes melt {
- 0% { transform: translateY(0); }
- 100% { transform: translateY(100px); opacity: 0; }
- }
- .melting {
- animation: melt 2s linear forwards;
- }
-`;
-document.head.appendChild(style);
-
-// Function to add 'melting' class to all text nodes
-function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
- });
-}
-
-// Add event listener to the page
-document.addEventListener('click', meltText);
+//--------------Flip the img tags when scrolling --------------------//
+
+let lastScrollTop = 0;
+
+window.addEventListener(
+ "scroll",
+ function () {
+ let st = window.pageYOffset || document.documentElement.scrollTop;
+ let elements = document.body.getElementsByTagName("img");
+
+ if (st > lastScrollTop) {
+ // downscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(-1)";
+ }
+ } else {
+ // upscroll
+ for (let i = 0; i < elements.length; i++) {
+ elements[i].style.transform = "scaleX(1)";
+ }
+ }
+ lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
+ },
+ false
+);
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
+style.innerHTML = `
+ @keyframes melt {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(100px); opacity: 0; }
+ }
+ .melting {
+ animation: melt 2s linear forwards;
+ }
+`;
+document.head.appendChild(style);
+
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
+function meltText() {
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
+ });
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
+}
+
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/bootstrap-app/themes/js/destruct.js b/bootstrap-app/themes/js/destruct.js
index c927683..7d887cc 100644
--- a/bootstrap-app/themes/js/destruct.js
+++ b/bootstrap-app/themes/js/destruct.js
@@ -1,10 +1,12 @@
+//--------------Flip the img tags when scrolling --------------------//
+
let lastScrollTop = 0;
window.addEventListener(
"scroll",
function () {
let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
+ let elements = document.body.getElementsByTagName("img");
if (st > lastScrollTop) {
// downscroll
@@ -21,9 +23,8 @@ window.addEventListener(
},
false
);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
style.innerHTML = `
@keyframes melt {
0% { transform: translateY(0); }
@@ -35,13 +36,99 @@ style.innerHTML = `
`;
document.head.appendChild(style);
-// Function to add 'melting' class to all text nodes
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
});
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
}
-// Add event listener to the page
-document.addEventListener('click', meltText);
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/king-of-pasta/js/destruct.js b/king-of-pasta/js/destruct.js
index c927683..7d887cc 100644
--- a/king-of-pasta/js/destruct.js
+++ b/king-of-pasta/js/destruct.js
@@ -1,10 +1,12 @@
+//--------------Flip the img tags when scrolling --------------------//
+
let lastScrollTop = 0;
window.addEventListener(
"scroll",
function () {
let st = window.pageYOffset || document.documentElement.scrollTop;
- let elements = document.body.getElementsByTagName("*");
+ let elements = document.body.getElementsByTagName("img");
if (st > lastScrollTop) {
// downscroll
@@ -21,9 +23,8 @@ window.addEventListener(
},
false
);
-
-// Define the CSS for the melting animation
-var style = document.createElement('style');
+//-------------------------------------------// Define the CSS for the melting animation
+var style = document.createElement("style");
style.innerHTML = `
@keyframes melt {
0% { transform: translateY(0); }
@@ -35,13 +36,99 @@ style.innerHTML = `
`;
document.head.appendChild(style);
-// Function to add 'melting' class to all text nodes
+// Initialize an array of text element types (tags) to rotate
+var textElementTypes = [
+ "p",
+ "h1",
+ "li",
+ "h2",
+ "span",
+ "img",
+ "h3",
+ "a",
+ "h4",
+ "div",
+ "h5",
+ "h6",
+];
+
+// Initialize a variable to keep track of the current text element type
+var currentElementType = 0;
+
+// Initialize a variable to keep track of the click count
+var clickCountMelt = 0;
+
+// Function to add 'melting' class to the specified text element type
function meltText() {
- var elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, a, span'); // Add more selectors as needed
- elements.forEach(function(element) {
- element.classList.add('melting');
+ var elements = document.querySelectorAll(
+ textElementTypes[currentElementType]
+ );
+ elements.forEach(function (element) {
+ element.classList.add("melting");
});
+
+ // Increment the click count
+ clickCountMelt++;
+
+ // Check if every 3rd click
+ if (clickCountMelt % 3 === 0) {
+ // Remove 'melting' class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ } else {
+ // Increment the currentElementType and wrap around if needed
+ currentElementType = (currentElementType + 1) % textElementTypes.length;
+ }
}
-// Add event listener to the page
-document.addEventListener('click', meltText);
+// Add an event listener to the entire document
+document.addEventListener("click", meltText);
+
+//--------------------------------------------Load something on 7th click-----------//
+// Initialize a counter for the number of clicks
+let clickCountReload = 0;
+// Define the maximum number of clicks required
+const maxClicksReload = 5;
+// Define the predefined link to load
+const predefinedLink = "#";
+// Function to handle the click event
+function handleButtonClick() {
+ clickCountReload++;
+ // Check if the required number of clicks is reached
+ if (clickCountReload >= maxClicksReload) {
+ // Load the predefined link
+ window.location.href = predefinedLink;
+ // Remove the melting class from all elements
+ elements.forEach(function (element) {
+ element.classList.remove("melting");
+ });
+ // Reset the counter
+ clickCountReload = 0;
+ }
+}
+// Add an event listener to the entire document
+document.addEventListener("click", handleButtonClick);
+//----------------------------------------Changing Place holder texts ---------//
+// Function to check if the user has scrolled to the bottom
+function isScrolledToBottom() {
+ const windowHeight = window.innerHeight;
+ const documentHeight = document.documentElement.scrollHeight;
+ const scrollPosition = window.scrollY;
+
+ // Consider a small buffer (e.g., 10 pixels) to account for minor discrepancies
+ return scrollPosition + windowHeight >= documentHeight - 10;
+}
+
+// Function to replace the placeholder value of a textarea
+function replacePlaceholderOnScroll() {
+ const textarea = document.getElementById("message");
+ const placeholderText = "Please help me. This is not fun.";
+
+ if (isScrolledToBottom()) {
+ textarea.placeholder = placeholderText;
+ }
+}
+
+// Add an event listener to the window's scroll event
+window.addEventListener("scroll", replacePlaceholderOnScroll);
diff --git a/lumia/index.html b/lumia/index.html
index 00fff25..fcc1c4d 100644
--- a/lumia/index.html
+++ b/lumia/index.html
@@ -1,643 +1,940 @@
-
+
-
-
-
-
-Lumia - Multipurpose Bootstrap Template
-
-
-
-
-
-
-
+
+
+
+
+ Lumia - Multipurpose Bootstrap Template
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Bootstrap & Multipurpose!
-
Lumia Most Amazing Theme
- That Ever Made
-
Accusantium quam, aliquam ultricies eget tempor id, aliquam eget nibh et. Maecen aliquam, risus at semper. Proin iaculis purus consequat sem cure digni ssim. Donec porttitora entum.
- Proin iaculis purus consequat sem cure digni ssim. Donec porttitora entum.Proin iaculis purus consequat sem cure digni ssim. Donec porttitora entum.
-