/[drupal]/contributions/modules/relatedlinks/relatedlinks.js
ViewVC logotype

Diff of /contributions/modules/relatedlinks/relatedlinks.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4.2.8, Thu May 8 18:03:13 2008 UTC revision 1.4.2.9, Thu May 8 19:19:10 2008 UTC
# Line 1  Line 1 
1  // $Id: relatedlinks.js,v 1.4.2.7 2008/05/08 17:25:33 karthik Exp $  // $Id: relatedlinks.js,v 1.4.2.8 2008/05/08 18:03:13 karthik Exp $
2    
3  // Todo: Convert to prototype (or behaviour, I suppose) and promote reuse.  // Todo: Convert to prototype (or behaviour, I suppose) and promote reuse.
4  $(document).ready(function() {  $(document).ready(function() {
# Line 8  $(document).ready(function() { Line 8  $(document).ready(function() {
8    
9    // Parse textarea for links and store them in a global array.    // Parse textarea for links and store them in a global array.
10    l = $(ta).val().split("\n");    l = $(ta).val().split("\n");
11    r = new RegExp('\w*([^\ \w]+)\ *(.*)$', 'i');    // We assume that the line is trimmed.
12      r = new RegExp('([^\S]+)\ +(.*)$', 'i');
13    links = new Array();    links = new Array();
14    for (var i = 0; i < l.length; i++) {    for (var i = 0; i < l.length; i++) {
15      m = l[i].match(r);      m = l[i].match(r);

Legend:
Removed from v.1.4.2.8  
changed lines
  Added in v.1.4.2.9

  ViewVC Help
Powered by ViewVC 1.1.2