menu
Tatoeba
language
Sekles Qqen
language Taqbaylit
menu
Tatoeba

chevron_right Sekles

chevron_right Qqen

Snirem

chevron_right Ssken-d tifyar s ugacur

chevron_right Snirem s tutlayt

chevron_right Snirem s tebdart

chevron_right Snirem s tecreḍt

chevron_right Snirem ameslaw

Tarbaɛt

chevron_right Aɣrab

chevron_right Tabdert n yiɛeggalen

chevron_right Tutlayin n yiɛeggalen

chevron_right Wid s tutlayt tayemmat

search
clear
swap_horiz
search
Zifre Zifre 20 Duǧembeṛ 2010 20 Duǧembeṛ 2010 3:16:46 n tufat UTC flag Report link Aseɣwen yezgan

In order to make linking easier for trusted users on Tatoeba, I've created a simple "bookmarklet":

javascript:location.href=location.href.replace("sentences/show","links/add")+"/"+window.prompt("Sentence ID","");

Add this as a bookmark in your browser. Then, when you are viewing a sentence, you can click on the bookmark and it will ask for a sentence ID number. Type it in or paste it and it will then create a link. You can create another bookmarklet and replace "add" with "delete" if you want to be able to unlink sentences too.

I created this in literally three minutes with no prior JavaScript experience, so it wouldn't surprise me if there are problems. However, it seemed to work okay in my limited testing.

{{vm.hiddenReplies[4507] ? 'expand_more' : 'expand_less'}} ffer tiririyin sken tiririyin
Zifre Zifre 20 Duǧembeṛ 2010 20 Duǧembeṛ 2010 3:17:49 n tufat UTC flag Report link Aseɣwen yezgan

Hopefully, someday this feature can be implemented directly in Tatoeba. ;-)

Swift Swift 20 Duǧembeṛ 2010 20 Duǧembeṛ 2010 6:12:20 n tufat UTC flag Report link Aseɣwen yezgan

Sweet! This sure beats the crap out of my silly little form.

Zifre Zifre 26 Duǧembeṛ 2010 26 Duǧembeṛ 2010 12:32:25 n tufat UTC flag Report link Aseɣwen yezgan

Okay, I've updated the code. Here is the URL for adding links:

javascript:var a=window.prompt("Sentence ID","");if(a!=null&&location.href.search(/tatoeba\.org\/.+\/sentences\/show\//)!=-1&&a.match(/^[0-9]+$/)!=null)location.href=location.href.replace("sentences/show","links/add")+"/"+a;

And here is the one for removing them:

javascript:var a=window.prompt("Sentence ID","");if(a!=null&&location.href.search(/tatoeba\.org\/.+\/sentences\/show\//)!=-1&&a.match(/^[0-9]+$/)!=null)location.href=location.href.replace("sentences/show","links/add")+"/"+a;

It's a lot longer now, but it should be more correct. Now you won't have to worry about strange things happening if you're not viewing a sentence on Tatoeba, you enter something that's not a number, or you click cancel.

Again, I'm totally new to Javascript and have spent a total of 15 minutes creating this and 1 testing it, so I'm sure there are things I've forgotten. Please tell me if you notice anything weird happening and I will try to fix it ASAP.