This process takes place after each page refresh. The code below calculates the SHA256 hash code of the entire page's content and stores it in a persistent variable. We can save the small hash string in the page's local storage for future reference (or session storage). We can calculate the hash value of the page's content and use it to determine if there have been any updates. Is it possible to be informed when the content of a page is changed? This expression includes four sections, the first matching 8:00 AM to 9:59 AM, the second matching 10:00 AM to 11:59 AM, the third matching 12:00 PM to 12:59 PM, and the last matching 1:00 PM to 5:59 PM. For matching between 8:00 AM to 5:59 PM, an expression similar to "(. The extension checks these reloading policies before reloading a tab, allowing the reloading job to be skipped. You can even use more complex regular expressions to match multiple ranges. You can test this regular expression in the browser console using "/. *PM" to limit the reloading of a tab to the hours between 2:00 PM and 4:00 PM. The local date string in the format of ", 2:47:35 PM" can be matched using the regular expression ". For example, if the user only wants to reload between 2:00 PM to 4:00 PM, the object would be: If both keys exist, both regular expressions must match for the reloading job to occur. The "date" key matches the local date with the current time, and the "url" key matches the current URL with the provided regular expression. By using the "url" key and its options, there is no longer a need to rely on policies to limit reloading jobs based on URL patterns. For instance, you can reload a subdomain or a page with a certain keyword in the URL. ![]() With these options, you can target specific URLs instead of entire hostnames. ![]() Use "pt:" for URLPattern matching, "ht:" for hostname matching, and "re:" for regular expression matching (note that two "" characters are required for escaping). The "url" keyword supports three types of matching. In version 0.5.3, you can use the "url" keyword instead of "hostname" to have more control over which tabs to reload. You can add as many hostnames as you need. If a tab matches, a reloading job will be automatically set for the specified hostname. The extension will match all the tabs with the hostnames listed in the JSON key. ![]() Go to the options page and set up a JSON string for the "Custom Jobs" section. Is it possible to reload multiple tabs at once upon start-up?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |