selfDestructSnapDelay.ts (1729B) - raw
1 import { defineModule } from "../types"; 2 import { interceptComponent } from "../utils"; 3 4 export default defineModule({ 5 name: "Self Destruct Snap Delay", 6 enabled: config => config.customSelfDestructSnapDelay, 7 init() { 8 interceptComponent( 9 'snap_editor_timer_tool/src/TimerPickerView', 10 'TimerPickerView', 11 { 12 "<init>": (args: any[], superCall: () => void) => { 13 if (args[1].options[0] == 30) { 14 args[1].style = 0; // seconds format 15 16 args[1].options = [ 17 5, // 5 seconds 18 10, // 10 seconds 19 20, // 20 seconds 20 30, // 30 seconds 21 60, // 1 minute 22 120, // 2 minutes 23 180, // 3 minutes 24 240, // 4 minutes 25 300, // 5 minutes 26 600, // 10 minutes 27 900, // 15 minutes 28 1200, // 20 minutes 29 1800, // 30 minutes 30 3600, // 1 hour 31 7200, // 2 hours 32 10800, // 3 hours 33 14400, // 4 hours 34 21600, // 6 hours 35 28800, // 8 hours 36 43200, // 12 hours 37 86400, // 1 day 38 172800, // 2 days 39 ] 40 } 41 42 superCall(); 43 } 44 } 45 ) 46 } 47 });