Changeset 31081

Show
Ignore:
Timestamp:
03/12/09 02:11:52 (4 years ago)
Author:
drry
Message:
  • is.gd に対するリクエストを POST から GET に修正しました。
Files:
1 modified

Legend:

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

    r31076 r31081  
    55// @include        http://* 
    66// @include        https://* 
    7 // @version        0.0.2 
     7// @version        0.0.3 
    88// ==/UserScript== 
    99// 
    10 // last modified: 2009/03/12 01:20 
     10// last modified: 2009/03/12 01:53 
    1111// 
    1212 
     
    9797  function createTinyURL(url, callback, error) { 
    9898    GM_xmlhttpRequest({ 
    99       method : 'post', 
     99      method : 'get', 
    100100      url    : 'http://is.gd/api.php?longurl=' + encodeURIComponent(url), 
    101       headers: { 'Content-type': 'application/x-www-form-urlencoded' }, 
    102101      onload : function(res) { 
    103         if (res.responseText != 'Error') callback(res.responseText) 
     102        if (res.responseText.indexOf('Error') != 0) callback(res.responseText) 
    104103        else if (typeof error == 'function') error(res) 
    105104      },