How do I cut off text?

So I'm making logs for an app which loads web-veiwer content, but when you search anything up on Google it will generate a very long URL, except I only need the base URL, for example, "sites.google.com" but instead it shows "ملف انجاز لمادة الفرائض ث". I only want it to show "sites.google.com". Is there any way to do that?

split the long url with / then select item 3?

1 Like

You could use javascript...

1 Like

How can i use Javascript in an MIT project? but that looks like it would work, thannkks

You already appear to be using a webviewer, use the runJavascript block?

1 Like

that sounds like a great solution, but I can't find the block, i'm using Custom Web Viewer by vknow360 , but i'm gonna use a new Web viewer and try it, thanks

customwebview has an equivalent block, and there is an event block for it as well:

image

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.