Spelling correction without any extension

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

nodding head nod GIF by 20th Century Fox Home Entertainment


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
image

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;

  1. now comes the last part

image

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

mr bean dancing GIF

I hope it helped you

Edit

there is a word limit for 32 words only

15 Likes

Epic work @Yashsehgal022

3 Likes

thanks @UnknownBeast :grin:

Excellent work @Yashsehgal022 :grinning: :grinning:

1 Like

thanks @Anu10 :grin: :heart:

1 Like

Nice Guide @Yashsehgal022 Keep It Up

1 Like

Thanks @Phantom :smiling_face_with_three_hearts:

Nice guide :+1: :+1:@Yashsehgal022

1 Like

thanks @Anwita_Divya :smiley:

Yeah… This is good one… :+1: :+1:

Let me implement this in my app…

but instead of ais, if you provide aia it will be good to check up :wink:

1 Like

thank you :heart: :smiling_face_with_three_hearts:

okay i will provide the aia in 5-10 minutes

2 Likes

What to say for the MasterMind the one and only @Yashsehgal022
one more thing is in my mind can we together make a super project ?

1 Like

Thanks :stuck_out_tongue::smiling_face_with_three_hearts:

Why not :wink:

1 Like

well this is an online method it would be much better if you made a offline method btw good work

1 Like

ok I will try that if possible

Thanks @luv.ak.tech :blush:

1 Like

Does this just check wether the spell is correct or not or replace it with correct word ?:thinking:

its like if the spelling is correct the JavaScript code will return null , so what I have done is
if response from JavaScript code is null then it returns seems like your spelling is correct

if the spelling is wrong it replaces it

2 Likes

Amazing idea. Congratulations for the guide

1 Like

thanksss … :grin: :heart:

@Yashsehgal022 u showed the actual power of webview :heart_eyes: keep it up

1 Like