This code snippet calculates the number of days you've used Obsidian. To modify the code to show you've used 200 days, follow these steps:

  1. Set a Fixed Value for total: Replace the original calculation for total with a direct assignment of 200:

    let total = 200;
    
  2. Update totalDays: Modify the totalDays variable to include the fixed total value:

    let totalDays = 'You have used *Obsidian* ' + total + ' days.';
    

Now, totalDays will display 'You have used Obsidian 200 days.' You can customize the string further to match your desired format.

You can then use the totalDays variable in your code as needed, for example, displaying it in the console, rendering it on a webpage, or performing other actions.

How to Modify Obsidian Usage Days Counter in JavaScript Code

原文地址: https://www.cveoy.top/t/topic/iGR 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录