Skip to content

Commit

Permalink
search fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Richter committed Sep 23, 2014
1 parent 466ca32 commit 248ebdc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ function searchMovieImdb (imdb) {
$.get("http://www.omdbapi.com/?i="+imdb,function(data) {
data = JSON.parse(data);
if (data.imdbRating) {
searchMovieCsfd(spaceTitle(data.Title),data.Year.slice(0,4),"makeMagicCsfd");
makeMagicImdb(data.imdbRating);
}
});
});
}


Expand All @@ -48,7 +49,7 @@ function autocompleteByTitle (title) {
var result = JSON.parse(data);
if (!result.Response) return;
console.log(result);
$("input[name='SQLnRokUvedeni']").val(result.Year);
$("input[name='SQLnRokUvedeni']").val(result.Year.slice(0,4));
$("input[name='SQLsIMDB']").val(result.imdbID.slice(2));
$("#side1cont").prepend("<div class=\"tab plus-poster\">PLAKÁT</div><img src =\""+result.Poster+"\">");

Expand Down Expand Up @@ -218,15 +219,15 @@ $(document).ready(function() {
$("a[href^='index.php?Fulltext']").after("<a title =\"Další verze titulků konkrétního filmu (pouze pro premium uživatele)\" class =\"plus-version\" href=\"http://www.titulky.com/index.php?Searching=AdvancedResult&AFulltext=&ANazev="+title+"&ARelease=&ARok="+year+"\">Další přesné verze</a>");
}

searchMovieCsfd(spaceTitle,year,"makeMagicCsfd");
// searchMovieCsfd(spaceTitle,year,"makeMagicCsfd");
searchMovieImdb(imdb);
}

// ropracovane detail
if (location.href.indexOf("Stat=5&item=") !== -1)
{
var link = $($(".soupis .row2").children()[5]).children().attr("href");
$(".soupis").before("<a class =\"tlacitko plus-state-update\" href ="+link+">Aktualizovat stav překladu</a>");
var link = $($(".soupis .row2").children()[6]).children().attr("href");
$(".soupis").eq(1).before("<a class =\"tlacitko plus-state-update\" href ="+link+">Aktualizovat stav překladu</a>");
}

// vysledky vyhledavani
Expand Down Expand Up @@ -353,7 +354,8 @@ $(document).ready(function() {
if (items.domu)
{
// tlacitko domu na kazde strance
$("#menu li:first").before("<li><a href =\"http://www.titulky.com\">Domů</a></li>");
// $("#menu li:first").before("<li><a href =\"http://www.titulky.com\">Domů</a></li>");
$("#menu li a:first").text("Domů");
}

if (items.premium)
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Titulky plus",
"short_name": "Titulky+",
"author": "Jan Richter",
"version": "0.6",
"version": "0.6.3",
"description": "Vylepšení webu titulky.com pro pohodlnější práci (nejen pro překladatele).",
"manifest_version": 2,
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion options.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>Obecné</h2>
<br><br>
<label>
<input type="checkbox" id="domu" name ="domu">
Zobrazit "Domů" (odkaz na hlavní stránku) v menu
Přepíše odkaz v menu "titulky.com" na "Domů""
</label>
<br><br>
<label>
Expand Down

0 comments on commit 248ebdc

Please sign in to comment.