[geeklog-hg] geeklog: Fixed TitleToId script for IE
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Sep 2 10:23:24 EDT 2013
changeset 9279:01081871d05f
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/01081871d05f
user: Tom <websitemaster at cogeco.net>
date: Mon Sep 02 10:22:56 2013 -0400
description:
Fixed TitleToId script for IE
diffstat:
public_html/javascript/title_2_id.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r 84a2ae3becff -r 01081871d05f public_html/javascript/title_2_id.js
--- a/public_html/javascript/title_2_id.js Mon Sep 02 10:22:08 2013 -0400
+++ b/public_html/javascript/title_2_id.js Mon Sep 02 10:22:56 2013 -0400
@@ -3,8 +3,13 @@
** Auto generate ID based on title **
*******************************************/
-function TitleToId(getTitle = 'title', setTl2ID = 'id', size = 128) {
+function TitleToId(getTitle, setTl2ID, size) {
+ // Set defaults if needed
+ getTitle = typeof getTitle !== 'undefined' ? getTitle : 'title';
+ setTl2ID = typeof setTl2ID !== 'undefined' ? setTl2ID : 'id';
+ size = typeof size !== 'undefined' ? size : 128;
+
var Separ = "-";
var Sch = ["Ä", "â", "î", "Å", "Å£", "à ", "á", "ã", "ä", "Ã¥", "æ", "ç", "Å", "ð", "è", "é", "ê", "ë", "ì", "Ã", "ï", "ñ", "û", "ù", "ú", "ü", "ž", "ý", "ÿ", "ò", "ó", "õ", "ô", "ö", "ø", "Å¡"];
var Nch = ["a", "a", "i", "s", "t", "a", "a", "a", "a", "a", "a", "c", "oe", "d", "e", "e", "e", "e", "i", "i", "i", "n", "u", "u", "u", "u", "z", "y", "y", "o", "o", "o", "o", "o", "o", "s"];
More information about the geeklog-cvs
mailing list