Skip to content

Commit

Permalink
- commit before creating the gh-pages branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sr3d committed Aug 17, 2010
1 parent 8e5a1c1 commit 5844bd6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 24 deletions.
2 changes: 1 addition & 1 deletion javascripts/f.js
@@ -1,6 +1,6 @@
/* alias */
// window.AR = Ajax.Request;
window.AR = Ajax.JSONRequest
// window.AR = Ajax.JSONRequest
// var PAR = function() { // paralelle Ajax Request
//
// }
Expand Down
25 changes: 8 additions & 17 deletions javascripts/gh.js
@@ -1,8 +1,10 @@
window.AR = Ajax.JSONRequest;


window.GH = {
hash: {}
,proxy: 'http://hoavui.com/github_jsonp.php?url='
// ,proxy: 'http://hoavui.com/github_jsonp.php?url='
,proxy: './proxy.php?url='

,api: 'http://github.com/api/v2/json'

,Commits: {
Expand Down Expand Up @@ -96,20 +98,9 @@ window.GH = {

new AR( GH.proxy + url, options );
}

/*
Show a blob at a specific
*/
,showByCommit: function( user_id, repository, commit_sha, path, options ) {
options = Object.extend({
onSuccess: Prototype.K
}, options || {});

var onData = options.onData;

var url = GH.api + '/blob/' + user_id + '/' + repository + '/' + commit_sha + path;

new AR( GH.proxy + url, options );
}
}
};

/* switch to the correct AR */
window.AR = GH.proxy.indexOf('./') == 0 ? Ajax.Request :
Ajax.JSONRequest;
6 changes: 1 addition & 5 deletions js2png
Expand Up @@ -33,11 +33,7 @@ js = `#{cmd}`
# debug out put
# File.open( min_temp_file , "w") {|f| f.write(js) }
js = ''
File.open( min_temp_file, "r") { |f|
js += f.read + "\n"
}


File.open( min_temp_file, "r") { |f| js += f.read + "\n" }

image = Magick::Image.new(1,js.length)
i = 0
Expand Down
6 changes: 5 additions & 1 deletion proxy.php
Expand Up @@ -10,6 +10,7 @@
// Get the url of to be proxied
// Is it a POST or a GET?
$url = ($_POST['url']) ? $_POST['url'] : $_GET['url'];
$jsoncallback = ($_POST['callback']) ? $_POST['callback'] : $_GET['callback'];

$allowed_domain = 'http://github.com';
// echo strpos( $url, $allowed_domain );
Expand Down Expand Up @@ -49,7 +50,10 @@
header("Content-Type: ".$mimeType);
}

echo $response;
if( $jsoncallback )
echo $jsoncallback . "(" . json_encode($response) . ")";
else
echo $response;

curl_close($session);

Expand Down

0 comments on commit 5844bd6

Please sign in to comment.