Skip to content

Instantly share code, notes, and snippets.

@Luen
Luen / download-assests.js
Created April 30, 2024 01:07
Toyota Adbuilder
// 1. Go to the asset page you want to download
// 2. Command+Option+I to open Chrome Inspector
// 3. Code the following code into the console and press enter:
document.querySelectorAll("button.primary").forEach((button, index) => setTimeout(() => button.click(), index * 1000));
// 4. The next download will start every 1 second until all are downloaded
@Luen
Luen / timer-with-beep.html
Created April 13, 2023 00:28
This is a interval timer - a timer that can do 6 min., 2 min., 2 min., 2 min. 2 min., 2 min., 2 min., 4 min. in a sequence for a total of 22 minutes.
<script>
const timerSequence = [6, 2, 2, 2, 2, 2, 2, 4]; // in minutes
let currentTimerIndex = 0;
function beep() {
const audioContext = new (window.AudioContext || window.webkitAudioContext)();
const oscillator = audioContext.createOscillator();
const gainNode = audioContext.createGain();
oscillator.connect(gainNode);
@Luen
Luen / meta facebook business
Last active April 3, 2024 22:36
mark messages as done - need to right click the done button and that's it. // Script 2, hover over the mark as done button on left (should light up green)
(function() {
const selector = 'div[id] > span > div > div > div > i[data-visualcompletion="css-img"]';
const clickElement = () => {
const element = document.querySelector(selector);
if (element) {
element.click();
} else {
console.error('Element not found:', selector);
}
};
@import url("https://fonts.googleapis.com/css2?family=Fugaz+One&family=Monoton&family=Righteous&display=swap");
html, body {
padding: 0;
height: 100%;
display: grid;
place-content: center;
background: #0A0A27;
}
@Luen
Luen / 404.html
Created January 24, 2023 06:56
404 error page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>404 not found</title>
<link rel="icon" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<script type="text/javascript"></script>
<link