Quasi Student Secure Web Browser?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Quasi Student Secure Web Browser?

Monte Goulding via use-livecode
Hi All,

I’m attempting to create a simple secure web browser iOS app for some teachers. I want to prevent any links within an approved site (i.e. “www.approvedsite.com") that link out to others sites from launching. For example, if the "www.approvedsite.com" has a link out to Youtube.com, I want to detect that it is outside the target site and prevent it from loading in the browser object. If the link is within the approved site, i.e. "www.approvedsite.com/anotherpage.html,” I want to allow that page to load in the browser object.

At first I thought i would use a widget, but then did not see any command that would get the url. So, I switched gears and went with the mobileControlCreate browser strategy.  I thought I could use the browserStartedLoading command, but I’m not quite sure how to go about it.

I am not sure how to capture the link url when the user clicks/taps on the link in the browser, and then check it against acceptable urls?

I had this is the card script:

on browserStartedLoading pUrl
put pUrl into tUrlLoading
wait 50
answer tUrlLoading
set the itemdel to "/"
answer item 2 of tUrlLoading
if item 2 of tUrlLoading is not "www.myopenmath.com" then
answer “You can not access this site."
end if
end browserStartedLoading


Is there a better way to go about accomplishing this in LiveCode?

Thank you!

John Patten
SUSD





_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Quasi Student Secure Web Browser?

Monte Goulding via use-livecode
Never mind… Figured out where all commands that go with the new browser widget were located (release notes).  I was looking in the dictionary and never saw them until I saw another post on the list.

This works:

on browserDocumentLoadBegin pURL

put the itemDel into tOrgItemDel

set the itemDel to "/"

if item 3 of pURL is not "www.myopenmath.com" then

launch url "https://www.myopenmath.com" in widget "OpenMathBrowser"

answer "Sorry that link is not accessible at this time."

end if

end browserDocumentLoadBegin


If anybody else is looking for those browser widget commands they can be found in the release notes here:  

http://livecodestatic.com/downloads/livecode/8_0_0/LiveCodeNotes-8_0_0_dp_11.pdf <http://livecodestatic.com/downloads/livecode/8_0_0/LiveCodeNotes-8_0_0_dp_11.pdf>

Cheers!

John Patten
SUSD

> On Mar 29, 2017, at 6:32 PM, JOHN PATTEN via use-livecode <[hidden email]> wrote:
>
> Hi All,
>
> I’m attempting to create a simple secure web browser iOS app for some teachers. I want to prevent any links within an approved site (i.e. “www.approvedsite.com") that link out to others sites from launching. For example, if the "www.approvedsite.com" has a link out to Youtube.com, I want to detect that it is outside the target site and prevent it from loading in the browser object. If the link is within the approved site, i.e. "www.approvedsite.com/anotherpage.html,” I want to allow that page to load in the browser object.
>
> At first I thought i would use a widget, but then did not see any command that would get the url. So, I switched gears and went with the mobileControlCreate browser strategy.  I thought I could use the browserStartedLoading command, but I’m not quite sure how to go about it.
>
> I am not sure how to capture the link url when the user clicks/taps on the link in the browser, and then check it against acceptable urls?
>
> I had this is the card script:
>
> on browserStartedLoading pUrl
> put pUrl into tUrlLoading
> wait 50
> answer tUrlLoading
> set the itemdel to "/"
> answer item 2 of tUrlLoading
> if item 2 of tUrlLoading is not "www.myopenmath.com" then
> answer “You can not access this site."
> end if
> end browserStartedLoading
>
>
> Is there a better way to go about accomplishing this in LiveCode?
>
> Thank you!
>
> John Patten
> SUSD
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Quasi Student Secure Web Browser?

Monte Goulding via use-livecode
Hi all,

You can find any commands/function/properties of the Browser widget in the
dictionary, too:

In the "API" tab, choose "Browser" in the "Choose API" dropdown. The same
applies to any other widget X.

Best,
Panos
--

On Thu, Mar 30, 2017 at 5:10 PM, JOHN PATTEN via use-livecode <
[hidden email]> wrote:

> Never mind… Figured out where all commands that go with the new browser
> widget were located (release notes).  I was looking in the dictionary and
> never saw them until I saw another post on the list.
>
> This works:
>
> on browserDocumentLoadBegin pURL
>
> put the itemDel into tOrgItemDel
>
> set the itemDel to "/"
>
> if item 3 of pURL is not "www.myopenmath.com" then
>
> launch url "https://www.myopenmath.com" in widget "OpenMathBrowser"
>
> answer "Sorry that link is not accessible at this time."
>
> end if
>
> end browserDocumentLoadBegin
>
>
> If anybody else is looking for those browser widget commands they can be
> found in the release notes here:
>
> http://livecodestatic.com/downloads/livecode/8_0_0/
> LiveCodeNotes-8_0_0_dp_11.pdf <http://livecodestatic.com/
> downloads/livecode/8_0_0/LiveCodeNotes-8_0_0_dp_11.pdf>
>
> Cheers!
>
> John Patten
> SUSD
>
> > On Mar 29, 2017, at 6:32 PM, JOHN PATTEN via use-livecode <
> [hidden email]> wrote:
> >
> > Hi All,
> >
> > I’m attempting to create a simple secure web browser iOS app for some
> teachers. I want to prevent any links within an approved site (i.e. “
> www.approvedsite.com") that link out to others sites from launching. For
> example, if the "www.approvedsite.com" has a link out to Youtube.com, I
> want to detect that it is outside the target site and prevent it from
> loading in the browser object. If the link is within the approved site,
> i.e. "www.approvedsite.com/anotherpage.html,” I want to allow that page
> to load in the browser object.
> >
> > At first I thought i would use a widget, but then did not see any
> command that would get the url. So, I switched gears and went with the
> mobileControlCreate browser strategy.  I thought I could use the
> browserStartedLoading command, but I’m not quite sure how to go about it.
> >
> > I am not sure how to capture the link url when the user clicks/taps on
> the link in the browser, and then check it against acceptable urls?
> >
> > I had this is the card script:
> >
> > on browserStartedLoading pUrl
> > put pUrl into tUrlLoading
> > wait 50
> > answer tUrlLoading
> > set the itemdel to "/"
> > answer item 2 of tUrlLoading
> > if item 2 of tUrlLoading is not "www.myopenmath.com" then
> > answer “You can not access this site."
> > end if
> > end browserStartedLoading
> >
> >
> > Is there a better way to go about accomplishing this in LiveCode?
> >
> > Thank you!
> >
> > John Patten
> > SUSD
> >
> >
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Quasi Student Secure Web Browser?

Monte Goulding via use-livecode
In reply to this post by Monte Goulding via use-livecode
JOHN PATTEN wrote:

 > If anybody else is looking for those browser widget commands they can
 > be found in the release notes here:
 >
 >
<http://livecodestatic.com/downloads/livecode/8_0_0/LiveCodeNotes-8_0_0_dp_11.pdf>

Thanks, John.  I believe those are now in the Dictionary as well.

What I haven't yet found is: has anyone here figured out a way to get
the browser widget to play the same range of video codecs as Chrome and
Firefox do?

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for Desktop, Mobile, and Web
  ____________________________________________________________
  [hidden email]        http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Quasi Student Secure Web Browser?

Monte Goulding via use-livecode
In reply to this post by Monte Goulding via use-livecode
Hi Panos,

> Am 30.03.2017 um 18:15 schrieb panagiotis merakos via use-livecode <[hidden email]>:
>
> Hi all,
>
> You can find any commands/function/properties of the Browser widget in the
> dictionary, too:
>
> In the "API" tab, choose "Browser" in the "Choose API" dropdown. The same
> applies to any other widget X.
>
> Best,
> Panos
> --
>
> On Thu, Mar 30, 2017 at 5:10 PM, JOHN PATTEN via use-livecode <
> [hidden email]> wrote:
>
>> Never mind… Figured out where all commands that go with the new browser
>> widget were located (release notes).  I was looking in the dictionary and
>> never saw them until I saw another post on the list.
>>
>> This works:
>>
>> on browserDocumentLoadBegin pURL
>> put the itemDel into tOrgItemDel
>> set the itemDel to "/"
>> if item 3 of pURL is not "www.myopenmath.com" then
>>
>> launch url "https://www.myopenmath.com" in widget "OpenMathBrowser"

I heavily doubted that this would actually work until I tried by myself.
Yes it works, go figure, so this should go into the dictionary in the next version! :-)

>> ...

Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Quasi Student Secure Web Browser?

Monte Goulding via use-livecode
Hi Klaus,

are you referring to the [launch url in widget] syntax? If yes, it does
exist in the dictionary, but not under the "Browser" section. It exists in
the "LiveCode Script" section, since it is an extension of the 'launch url"
command.

But yes, we should add a reference to it in the "Browser" section as well :)

Best,
Panos
--

On Thu, Mar 30, 2017 at 5:21 PM, Klaus major-k via use-livecode <
[hidden email]> wrote:

> Hi Panos,
>
> > Am 30.03.2017 um 18:15 schrieb panagiotis merakos via use-livecode <
> [hidden email]>:
> >
> > Hi all,
> >
> > You can find any commands/function/properties of the Browser widget in
> the
> > dictionary, too:
> >
> > In the "API" tab, choose "Browser" in the "Choose API" dropdown. The same
> > applies to any other widget X.
> >
> > Best,
> > Panos
> > --
> >
> > On Thu, Mar 30, 2017 at 5:10 PM, JOHN PATTEN via use-livecode <
> > [hidden email]> wrote:
> >
> >> Never mind… Figured out where all commands that go with the new browser
> >> widget were located (release notes).  I was looking in the dictionary
> and
> >> never saw them until I saw another post on the list.
> >>
> >> This works:
> >>
> >> on browserDocumentLoadBegin pURL
> >> put the itemDel into tOrgItemDel
> >> set the itemDel to "/"
> >> if item 3 of pURL is not "www.myopenmath.com" then
> >>
> >> launch url "https://www.myopenmath.com" in widget "OpenMathBrowser"
>
> I heavily doubted that this would actually work until I tried by myself.
> Yes it works, go figure, so this should go into the dictionary in the next
> version! :-)
>
> >> ...
>
> Best
>
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Quasi Student Secure Web Browser?

Monte Goulding via use-livecode
Hi Panos,

> Am 30.03.2017 um 18:26 schrieb panagiotis merakos via use-livecode <[hidden email]>:
>
> Hi Klaus,
>
> are you referring to the [launch url in widget] syntax? If yes,

yes.

> it does
> exist in the dictionary, but not under the "Browser" section. It exists in
> the "LiveCode Script" section, since it is an extension of the 'launch url"
> command.

AHA! :-)

> But yes, we should add a reference to it in the "Browser" section as well :)

Yes, please.

> Best,
> Panos
> --
>
> On Thu, Mar 30, 2017 at 5:21 PM, Klaus major-k via use-livecode <
> [hidden email]> wrote:
>
>> Hi Panos,
>>
>>> Am 30.03.2017 um 18:15 schrieb panagiotis merakos via use-livecode <
>> [hidden email]>:
>>>> ...
>>>> This works:
>>>>
>>>> on browserDocumentLoadBegin pURL
>>>> put the itemDel into tOrgItemDel
>>>> set the itemDel to "/"
>>>> if item 3 of pURL is not "www.myopenmath.com" then
>>>>
>>>> launch url "https://www.myopenmath.com" in widget "OpenMathBrowser"
>>
>> I heavily doubted that this would actually work until I tried by myself.
>> Yes it works, go figure, so this should go into the dictionary in the next
>> version! :-)
>>
>>>> ...

Best

Klaus
>

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...