Load jQuery into your current page by copying and pasting the following code into your Chrome Console.
var jqry = document.createElement('script');jqry.src = "https://code.jquery.com/jquery-3.3.1.min.js"; document.getElementsByTagName('head').appendChild(jqry); jQuery.noConflict();
It may take a bit of time for jQuery to load. But, once jQuery is loaded, you can run your custom jQuery functions in chrome console. There may be some conflicts with other jQuery versions that may have been loaded on the page.
If you don’t know how to get to your browser’s console, make sure you right click on the page that you want to scrape and click on Inspect.
Then, click on the Console tab, paste the code that you copied above it into the console, and click enter to run the code. It’ll look like the picture below:
If you often come across this situation and have to insert jQuery in multiple pages, you can probably save it as a bookmarklet and include it in the page just by clicking on that bookmarklet. Follow the steps below to create a bookmarklet.
Step 1: Open an empty tab in your browser. Step 2: Bookmark that empty tab with a name. Step 3: Now edit that saved bookmark and save the following code in the place of url or location.
Step 4: Save the bookmark. Step 5: Now you can include jQuery in any of the webpages you want, just by clicking on the bookmarklet after the required webpage is loaded.
There are some webpages (Eg: gmail) who strictly doesn’t allow loading of external scripts. On those pages the approach mentioned above will not work.
So what do you think? Did I miss something? Is any part unclear? Leave your comments below.