// -----------------------------
// Interactive FILMS Dashboard (v39: Ultra-Lean Memory Manager)
// -----------------------------
const favoriteActorsList = [
"Tom Hanks", "Leonardo DiCaprio", "Brad Pitt", "Sigourney Weaver",
"Anthony Hopkins", "Denzel Washington", "Meryl Streep", "Christian Bale"
// 1. Upgraded to "v23" - Added Real-Time Results Counter
const stateKey = "dv_search_state_v23_" + dv.current().file.name;
const defaultState = {
term: "",
cat: true, chan: true, searchUsp: true, searchTags: true,
rUnder3: false, r3: false, r35: false, r4: false, r45: false, r5: true, rNone: false,
requireUsp: false, sourceType: "youtube",
cCategory: true, cThumb: true, cIcon: true, cUsp: true, cPlaylists: true, cSubs: true, cRating: true,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| clone_all_repos() { | |
| local username="$1" | |
| # Check if the username is provided | |
| if [ -z "$username" ]; then | |
| echo "Error: GitHub username not provided." | |
| return 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import socket | |
| import sys | |
| import os | |
| import signal | |
| import subprocess | |
| import atexit | |
| import psutil | |
| from pathlib import Path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Model extends Database | |
| { | |
| protected function validate_empty($data, $field, $err_message = null) | |
| { | |
| if (empty($data[$field])) { | |
| // Use first part of field name in string e.g. currency_id required => currency required | |
| if (empty($err_message)) { | |
| $err_message = explode("_", $field)[0] . ' required'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const audio = new Audio( 'https://dl.dropboxusercontent.com/s/h8pvqqol3ovyle8/tom.mp3' ); | |
| audio.muted = true; | |
| const alert_elem = document.querySelector( '.alert' ); | |
| audio.play().then( () => { | |
| // already allowed | |
| alert_elem.remove(); | |
| resetAudio(); | |
| } ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .alert { | |
| font: 14px Arial, sans-serif; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| background: white; | |
| border: 1px solid lightgray; | |
| box-shadow: 3px 3px 12px lightgray; | |
| } | |
| p { margin: 12px; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="alert"> | |
| <p>This webpage would like to play sounds</p> | |
| <p class="buttons"> | |
| <button value="0">Block</button> | |
| <button value="1">Allow</button> | |
| </p> | |
| </div> | |
| <button id="btn">trigger notification</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function myDelayedThing() { | |
| var mySelectors = document.querySelectorAll('.something'); | |
| // Loop through mySelectors | |
| for(var i = 0; i < menuLinks.length; i++) { | |
| // Add 'open' class on mouseover | |
| menuLinks[i].addEventListener('mouseover', function() { | |
| this.classList.add('open'); |
NewerOlder