Show
Ignore:
Timestamp:
03/15/08 23:44:24 (4 years ago)
Author:
drry
Message:

lang/javascript/userscripts/buildlink.user.js:

  • fixed a regexp for TinyURL.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/userscripts/buildlink.user.js

    r7971 r7977  
    155155    TinyURL: { 
    156156        create: function(url, callback) { 
    157             if(!(/^https?:\/\//).test(url)) return callback(url); 
     157            if(!(/^https?:\/\//.test(url))) return callback(url); 
    158158            var endpoint = 'http://tinyurl.com/api-create.php?url='; 
    159159            GM_xmlhttpRequest({ 
     
    161161                url: endpoint + url, 
    162162                onload: function(xhr) { 
    163                     (/^http:\/\/tinyurl.com\/[a-z0-9]*?$/).test(xhr.responseText) ? 
     163                    (/^http:\/\/tinyurl\.com\/[a-z0-9=]+$/).test(xhr.responseText) ? 
    164164                        callback(xhr.responseText) : callback(url); 
    165165                },