1,816
edits
David Mason (talk | contribs) No edit summary |
David Mason (talk | contribs) No edit summary |
||
| (11 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
function showNav() { | function showNav() { | ||
$(".noprint").show(); | $(".noprint").show(); | ||
$('#content').css('margin-left', '10em'); | |||
$('#wnavcontrol').remove(); | $('#wnavcontrol').remove(); | ||
var dshow = "<span id='wnavcontrol' onclick='hideNav()' style=' | var dshow = "<span id='wnavcontrol' style='float: right'><a onclick='clickSupport(1)'>FB Credits 1</a>, <a onclick='clickSupport(5)'>5</a>, <a onclick='clickSupport(10)'>10</a> | <a onclick='hideNav()' style='font-weight: bold'>-Wiki</a></span>"; | ||
$('#firstHeading').before(dshow).fadeIn(); | $('#firstHeading').before(dshow).fadeIn(); | ||
} | } | ||
| Line 14: | Line 15: | ||
$('#wnavcontrol').remove(); | $('#wnavcontrol').remove(); | ||
} | } | ||
var dshow = "<span id='wnavcontrol' onclick='showNav()' style=' | var dshow = "<span id='wnavcontrol' style='float: right'><a onclick='clickSupport(1)'>FB Credits 1</a>, <a onclick='clickSupport(5)'>5</a>, <a onclick='clickSupport(10)'>10</a> | <a onclick='showNav()' style='font-weight: bold'>+Wiki</a></span>"; | ||
$('#firstHeading').before(dshow).fadeIn(); | $('#firstHeading').before(dshow).fadeIn(); | ||
wnavcontrol = true; | wnavcontrol = true; | ||
| Line 22: | Line 23: | ||
$('#firstHeading').wrap('<div style="width: 100%" />'); | $('#firstHeading').wrap('<div style="width: 100%" />'); | ||
showNav(); | |||
FB.init({appId: 129531840449132, status: true, cookie: true}); | |||
if (document.getElementsByClassName == undefined) { | if (document.getElementsByClassName == undefined) { | ||
| Line 48: | Line 52: | ||
} | } | ||
} | } | ||
function clickSupport(num) { | |||
document.write('<script src="http://connect.facebook.net/en_US/all.js"></script>'); | |||
// Assign an internal ID that points to a database record | |||
var order_info = 'canbudget'+num; | |||
// calling the API ... | |||
var obj = { | |||
method: 'pay', | |||
order_info: order_info, | |||
purchase_type: 'item' | |||
}; | |||
FB.ui(obj, callback); | |||
} | |||
var callback = function(data) { | |||
if (data['order_id']) { | |||
return true; | |||
} else { | |||
//handle errors here | |||
return false; | |||
} | |||
}; | |||
function writeback(str) { | |||
document.getElementById('output').innerHTML=str; | |||
} | |||