Introduction
Hello everyone welcome again
Today I am sharing a little logic with you all
so if you guys recall I made an extension a few days ago that helps you to correct spelling errors, so I found another way to do that without any extension
so without wasting any time let’s go guys
Step-1
add a label, a web view, a button, and a textbox to your designer tab
Step -2
Make the webview invisible
before going to step 3 let me explain to you guys, how I am checking the spellings, so if you guys have ever noticed that if we write the wrong spelling in the google search box while surfing on the net then google shows us some recommendations that search this instead of this
so I have scraped those recommendations using JavaScript
Step-3
now comes the coding part
Goes to google.com
and sets the query in the URL as the wrong spelling entered by the user
basically it formats the URL that needs to be loaded
Now what the if part does it it checks when the page is loaded it checks whether the text entered by the user is a word or a sentence
if its a word then it Evaluates this script :-
document.getElementById("fprsl").textContent;
if its a sentence then it Evaluates this script :-
document.getElementById('fprsl').innerText;
- now comes the last part
when the JavaScript is evaluated it checks if the spelling was right then it returns
seems like your spelling is correct
else it returns the correct spelling on a label
here is the ais for the tutorial
spelling.ais (11.3 KB)
Here the tutorial finishes
I hope it helped you
Edit
there is a word limit for 32 words only