Skip to content

Commit

Permalink
little html fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Jun 10, 2016
1 parent 2f36f9c commit a7465bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions glotdict.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jQuery(document).ready(function () {
*/
function gd_add_project_links() {
if (jQuery('.gp-content .breadcrumb li:last-child a').length > 0) {
var lang = jQuery('.gp-content .breadcrumb li:last-child a').attr('href');
lang = lang.split('/');
var lang = jQuery('.gp-content .breadcrumb li:last-child a').attr('href').split('/');
lang = lang[lang.length - 2];
jQuery('.gp-content').prepend('<a style="float:right" href="https://translate.wordpress.org/locale/' + lang + '/default">' + jQuery('.gp-content .breadcrumb li:last-child a').html() + ' Projects to Translate</a>');
jQuery('.gp-content h2').prepend('<a class="glossary-link" style="float:right;padding-left:5px;margin-left:5px;border-left: 1px solid black;" href="https://translate.wordpress.org/stats">Translation Global Status</a>');
Expand All @@ -60,7 +59,7 @@ jQuery(document).ready(function () {
jQuery('.gp-content').prepend('<button style="float:right" class="gd_scroll">Scroll to ' + gd_get_lang() + '</button>');
jQuery('.gd_scroll').on('click', function () {
var row = jQuery("#stats-table tr th a:contains('" + gd_get_lang() + "')");
row.html('<b>&nbsp;&nbsp;&nbsp;' + row.html() + '</a>');
row.html('<b>&nbsp;&nbsp;&nbsp;' + row.html() + '</b>');
jQuery('html, body').animate({scrollTop: row.offset().top - 50});
});
}
Expand Down

0 comments on commit a7465bf

Please sign in to comment.