X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fjavascript%2Fxorg.js;h=3e6779ad857d9f662daaac19220d473bcb660644;hb=c3b581dc531c40960509e3115d8c61ebd5897ee3;hp=89c35b208c31bc5cb552473044e27be9d584e441;hpb=2553b7686e0678b8e27858a7c377e73ecb410aec;p=platal.git diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 89c35b2..3e6779a 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2003-2009 Polytechnique.org * + * Copyright (C) 2003-2010 Polytechnique.org * * http://opensource.polytechnique.org/ * * * * This program is free software; you can redistribute it and/or modify * @@ -167,11 +167,7 @@ var __goodies_rss = { {'url_prefix': 'http://add.my.yahoo.com/content?.intl=fr&url=', 'img': 'images/goodies/add-yahoo.gif', 'alt': 'Add to My Yahoo!', - 'title': 'Ajouter à My Yahoo!'}, - {'url_prefix': 'http://www.newsgator.com/ngs/subscriber/subext.aspx?url=', - 'img': 'images/goodies/add-newsgator.gif', - 'alt': 'Subscribe in NewsGator Online', - 'title': 'Ajouter à Newsgator'} + 'title': 'Ajouter à My Yahoo!'} ] }; @@ -212,6 +208,7 @@ function auto_links() { url = document.URL; fqdn = url.replace(/^https?:\/\/([^\/]*)\/.*$/,'$1'); light = (url.indexOf('display=light') > url.indexOf('?')); + resource_page = (url.indexOf('rss') > -1 || url.indexOf('ical') > -1); $("a,link").each( function(i) { @@ -235,7 +232,7 @@ function auto_links() { href = 'http://' + fqdn + '/' + href; } } - if (this.nodeName.toLowerCase() == 'a') { + if (this.nodeName.toLowerCase() == 'a' && !resource_page) { if (rss && href.indexOf('prefs/rss') < 0 && (href.indexOf('xml') > -1 || href.indexOf('hash'))) { goodiesPopup(this, __goodies_rss); } else if (ical) { @@ -262,12 +259,12 @@ function auto_links() { // {{{ function checkPassword -function getType(char) { - if (char >= 'a' && char <= 'z') { +function getType(c) { + if (c >= 'a' && c <= 'z') { return 1; - } else if (char >= 'A' && char <= 'Z') { + } else if (c >= 'A' && c <= 'Z') { return 2; - } else if (char >= '0' && char <= '9') { + } else if (c >= '0' && c <= '9') { return 3; } else { return 4; @@ -322,7 +319,7 @@ function checkPassword(box, okLabel) { }, 750) .parent().stop() .animate({ backgroundColor: bgcolor }, 750); - var submitButton = $(":submit[@name='" + passwordprompt_submit + "']"); + var submitButton = $(":submit[name='" + passwordprompt_submit + "']"); if (ok && pass.length >= 6) { submitButton.attr("value", okLabel); submitButton.removeAttr("disabled");