summaryrefslogtreecommitdiff
path: root/gentoobrowse/js/pkgtracking.js
blob: 523c1022ebaf8f18b6bd8aefa15dec8c8f55f43d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function track()
{
	toggleTracking('PUT');
}

function untrack()
{
	toggleTracking('DELETE');
}

function toggleTracking(method)
{
	$.ajax(window.location.pathname + '/tracked', {
		method: method,
		success: function() {
			$('#dotrack').toggle();
			$('#dountrack').toggle();
		}
	});
}