Skip to content

Commit b689ac6

Browse files
committed
remove javascript and logs
1 parent ad90b33 commit b689ac6

File tree

2 files changed

+0
-93
lines changed

2 files changed

+0
-93
lines changed

PBWebHistoryController.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ - (NSMutableDictionary *)parseStats:(NSString *)txt
134134
if([line length]==0){
135135
black++;
136136
}else if(black==2){
137-
NSLog(@"l=%@",line);
138137
NSArray *file=[line componentsSeparatedByString:@"\t"];
139138
if([file count]==3){
140139
[stats setObject:file forKey:[file objectAtIndex:2]];

html/views/history/history.js

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,14 @@
1-
var confirm_gist = function(confirmation_message) {
2-
if (!Controller.isFeatureEnabled_("confirmGist")) {
3-
gistie();
4-
return;
5-
}
6-
7-
// Set optional confirmation_message
8-
confirmation_message = confirmation_message || "Yes. Paste this commit.";
9-
var deleteMessage = Controller.getConfig_("github.token") ? " " : "You might not be able to delete it after posting.<br>";
10-
var publicMessage = Controller.isFeatureEnabled_("publicGist") ? "<b>public</b>" : "private";
11-
// Insert the verification links into div#notification_message
12-
var notification_text = 'This will create a ' + publicMessage + ' paste of your commit to <a href="http://gist.github.com/">http://gist.github.com/</a><br>' +
13-
deleteMessage +
14-
'Are you sure you want to continue?<br/><br/>' +
15-
'<a href="#" onClick="hideNotification();return false;" style="color: red;">No. Cancel.</a> | ' +
16-
'<a href="#" onClick="gistie();return false;" style="color: green;">' + confirmation_message + '</a>';
17-
18-
notify(notification_text, 0);
19-
// Hide img#spinner, since it?s visible by default
20-
$("spinner").style.display = "none";
21-
}
22-
23-
var gistie = function() {
24-
notify("Uploading code to Gistie..", 0);
25-
26-
parameters = {
27-
"file_ext[gistfile1]": "patch",
28-
"file_name[gistfile1]": commit.object.subject.replace(/[^a-zA-Z0-9]/g, "-") + ".patch",
29-
"file_contents[gistfile1]": commit.object.patch(),
30-
};
31-
32-
// TODO: Replace true with private preference
33-
token = Controller.getConfig_("github.token");
34-
login = Controller.getConfig_("github.user");
35-
if (token && login) {
36-
parameters.login = login;
37-
parameters.token = token;
38-
}
39-
if (!Controller.isFeatureEnabled_("publicGist"))
40-
parameters.private = true;
41-
42-
var params = [];
43-
for (var name in parameters)
44-
params.push(encodeURIComponent(name) + "=" + encodeURIComponent(parameters[name]));
45-
params = params.join("&");
46-
47-
var t = new XMLHttpRequest();
48-
t.onreadystatechange = function() {
49-
if (t.readyState == 4 && t.status >= 200 && t.status < 300) {
50-
if (m = t.responseText.match(/<a href="\/gists\/([a-f0-9]+)\/edit">/))
51-
notify("Code uploaded to gistie <a target='_new' href='http://gist.github.com/" + m[1] + "'>#" + m[1] + "</a>", 1);
52-
else {
53-
notify("Pasting to Gistie failed :(.", -1);
54-
Controller.log_(t.responseText);
55-
}
56-
}
57-
}
58-
59-
t.open('POST', "https://gist.github.com/gists");
60-
t.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
61-
t.setRequestHeader('Accept', 'text/javascript, text/html, application/xml, text/xml, */*');
62-
t.setRequestHeader('Content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
63-
64-
try {
65-
t.send(params);
66-
} catch(e) {
67-
notify("Pasting to Gistie failed: " + e, -1);
68-
}
69-
}
70-
711
var selectCommit = function(a) {
722
Controller.selectCommit_(a);
733
}
744

75-
// Relead only refs
76-
var reload = function() {
77-
commit.reloadRefs();
78-
showRefs();
79-
}
80-
815
var showImage = function(element, filename)
826
{
837
element.outerHTML = '<img src="GitX://' + commit.sha + '/' + filename + '">';
848
return false;
859
}
8610

87-
var enableFeature = function(feature, element)
88-
{
89-
if(!Controller || Controller.isFeatureEnabled_(feature)) {
90-
element.style.display = "";
91-
} else {
92-
element.style.display = "none";
93-
}
94-
}
95-
96-
var enableFeatures = function()
97-
{
98-
enableFeature("gist", $("gist"))
99-
}
100-
101-
10211
var showDiff = function(data){
10312
$("diff").innerHTML=data;
104-
enableFeatures();
10513
}
10614

0 commit comments

Comments
 (0)