Skip to content

Instantly share code, notes, and snippets.

@m-rey
Last active August 20, 2023 19:01
Show Gist options
  • Save m-rey/2c74d30a4dc64ef759e43cdbad2f84e8 to your computer and use it in GitHub Desktop.
Save m-rey/2c74d30a4dc64ef759e43cdbad2f84e8 to your computer and use it in GitHub Desktop.
script to press the button to load more results in kagi search results
// ==UserScript==
// @name Auto Click Load More Results on Kagi
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically click the "Load More Results" button on Kagi search once per navigated site
// @author You
// @match https://kagi.com/search*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Check if the script has already been run for this navigated site
if (!sessionStorage.getItem('scriptExecuted')) {
var btn = document.querySelector('#load_more_results');
if (btn) {
btn.click();
// Mark the script as executed for this navigated site
sessionStorage.setItem('scriptExecuted', 'true');
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment