Import bookmarklet on iPad

Is there anyway I can get the import bookmarklet onto the iPad? I’ve enabled the bookmark bar and was trying to copy the code into the URL of another bookmark on my iPad. That would work, wouldn’t it? I just can’t get the JavaScript code.

I haven’t tried it yet, but you can try going on your computer, right clicking the bookmarklet and copying the link (or adding it as a bookmark then grabbing the code from there), emailing this to yourself then creating a bookmark on your iPad and pasting in this code. Let me know if it works!

If I send you an email could you email it to me? Haven’t got access to my laptop at the moment.

Also on a mobile, sorry!

Looking for this?
javascript:var%20lingq_base_url%20=%20%27http://www.lingq.com%27;(function(){(function(){var%20b=function(){window.lingq_bookmarklet%3Flingq_bookmarklet():window.setTimeout(b,500)},c=document.getElementsByTagName(%22head%22)[0],a=document.createElement(%22script%22);a.setAttribute(%22type%22,%22text/javascript%22);a.setAttribute(%22src%22,lingq_base_url+%22/bookmarklet/bookmarklet.js%22);c.appendChild(a);b()})()})()

I tried to copy and paste it, but it didn’t work. :frowning:

On the forum, if you highlight a piece of text then scroll down to the bottom and click on the bookmarklet down there it works. I’ll keep trying to get it to work on any web page (if possible).

I did try this on the LingQ forum. I copied the whole code, but when I clicked on the bookmarklet, nothing happened. Then I tried to remove “javascript:” (thinking it may not be part of the code" and I got an error message. I have an iPad 2.

“javascript:” is part of a link like “http://”, so you should not remove it.

The difference is that a JavaScript “link” executes some code locally within the context of the currently loaded webpage. This may be forbidden in Apple’s mobile browsers.

Thanks, Hape. However, as I wrote, I did try both with and without “javascript:”. When I tried with it, nothing happened at all.

I got it working! First, enable bookmark bar. Then, add a random bookmark to the bar. I edited mine and called it “Import Text”. After that,I downloaded an app called “Browsele lite”. This enables you to create bookmarks. On the app, navigate to LingQ, hold down the bookmarklet and choose copy. I don’t know if that step is needed but it worked. Go back into safari and edit the bookmark by replacing the URL with the copied code.

Now, you can import text into LingQ from mobile safari!


Here’s the code I got

javascript:var%20lingq_base_url%20=%20%27http://www.lingq.com%27;(function()%7B(function()%7Bvar%20b=function()%7Bwindow.lingq_bookmarklet%3Flingq_bookmarklet():window.setTimeout(b,500)%7D,c=document.getElementsByTagName(%22head%22)%5B0%5D,a=document.createElement(%22script%22);a.setAttribute(%22type%22,%22text/javascript%22);a.setAttribute(%22src%22,lingq_base_url+%22/bookmarklet/bookmarklet.js%22);c.appendChild(a);b()%7D)()%7D)()

I don’t know if that’s any different to the one previously posted?


Wow, thanks a lot! I just copied and pasted your code in Safari and it works! :slight_smile:

I’ve been thinking that if it’s possible to import texts on the iPad, would it also be possible to create a bookmarklet to highlight phrases as well? I’m going to look into it…

Thanks!!

I was able to do this on my iPad mini without needing an app. Here are the steps.

Go to settings, Safari, and click to enable “always show bookmarks bar”.
Bookmark a site to the bookmarks bar. [Go to a new tab, open a site, click the button/spot to the left of the address bar that looks like a box with an arrow emerging from it, click “bookmark”, direct the new bookmark into the bookmarks bar, and save.]
From this thread, copy the javascript text above, posted by CaptainAmerica.
Click the button/spot that looks like an open book, a bit further to the left of the address bar.
Enter the bookmarks bar folder if it is not the default to display.
Click edit.
Click the new bookmark.
Edit the name to something convenient.
Erase the address, and replace it with the javascript copied above.
Click anywhere. There is no save option.

It should work now.