Initial Commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
function MM_swapImgRestore() { //v3.0
|
||||
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
|
||||
}
|
||||
|
||||
function MM_openBrWindow(theURL,winName,features) { //v2.0
|
||||
window.open(theURL,winName,features);
|
||||
}
|
||||
|
||||
|
||||
function MM_preloadImages() { //v3.0
|
||||
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
|
||||
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
|
||||
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
|
||||
}
|
||||
|
||||
function MM_findObj(n, d) { //v3.0
|
||||
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
|
||||
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
|
||||
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
|
||||
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
|
||||
}
|
||||
|
||||
function MM_swapImage() { //v3.0
|
||||
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
|
||||
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
|
||||
}
|
||||
|
||||
function gogo(dropdown) {
|
||||
var tempURL = dropdown.options[dropdown.selectedIndex].value;
|
||||
if(tempURL!="") {
|
||||
document.location.href = tempURL;
|
||||
}
|
||||
}
|
||||
5
Java/Processing/processing-3.3.6/modes/java/reference/javascript/jquery-1.9.1.min.js
vendored
Normal file
5
Java/Processing/processing-3.3.6/modes/java/reference/javascript/jquery-1.9.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Handle switching on/off specific API for modes on index pages.
|
||||
fjenett - 2012-01
|
||||
*/
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.ref-top').show();
|
||||
$('.ref-top a').each(function(i,e){
|
||||
var mode = $(e).attr('mode');
|
||||
$(e).bind('click',function(evt){
|
||||
activateItems($('a.ref-link'));
|
||||
disableItems( $('.no-'+mode) );
|
||||
activateItems( $('.'+mode+'-only').show() );
|
||||
$('#ref-mode-switch a.is-selected').removeClass('is-selected');
|
||||
$(this).addClass('is-selected');
|
||||
},false);
|
||||
});
|
||||
var showMode = "java";
|
||||
if ( document.location.href.indexOf('mode=') >= 0 )
|
||||
showMode = document.location.href.replace(/.+\?.*mode=([a-z]+)&?.*/,"$1");
|
||||
$('.ref-top a[mode='+showMode+']').click();
|
||||
});
|
||||
|
||||
function disableItems ( items ) {
|
||||
items.addClass("is-disabled");
|
||||
items.bind('click',function(){return false;},false);
|
||||
items.attr('title','These items are not available in the current mode.');
|
||||
}
|
||||
|
||||
function activateItems ( items ) {
|
||||
items.removeClass("is-disabled");
|
||||
items.unbind('click');
|
||||
items.attr('title','');
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
1
Java/Processing/processing-3.3.6/modes/java/reference/javascript/p5.dom.min.js
vendored
Normal file
1
Java/Processing/processing-3.3.6/modes/java/reference/javascript/p5.dom.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
Java/Processing/processing-3.3.6/modes/java/reference/javascript/p5.min.js
vendored
Normal file
8
Java/Processing/processing-3.3.6/modes/java/reference/javascript/p5.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1038
Java/Processing/processing-3.3.6/modes/java/reference/javascript/prototype.js
vendored
Normal file
1038
Java/Processing/processing-3.3.6/modes/java/reference/javascript/prototype.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,109 @@
|
||||
$(function(){
|
||||
|
||||
// redirect download to support
|
||||
$('.download [href*="download.processing.org"]').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
window.open($(this).attr('href'))
|
||||
window.location = '/download/support.html'
|
||||
window.focus()
|
||||
})
|
||||
|
||||
// sticky scroll
|
||||
if(!Modernizr.touch){
|
||||
$(window).scroll(function(){
|
||||
if($(this).scrollTop() < 114){
|
||||
$('.navBar').removeClass('stuck')
|
||||
} else {
|
||||
$('.navBar').addClass('stuck')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// if on the homepage, gather recent tweets/commits
|
||||
if($('body').attr('id')=='Cover'){
|
||||
|
||||
// recent tweets
|
||||
$.getJSON('/content/static/feeds/twitter.php', function(data) {
|
||||
$.each(data, function(i, tweet) {
|
||||
var time = parse_date(tweet.created_at);
|
||||
var timeText = format_relative_time(extract_relative_time(time));
|
||||
|
||||
var tweet_html = '<li><div>'+tweet.text.parseURL().parseUsername().parseHashtag();
|
||||
tweet_html += ' about';
|
||||
tweet_html += '<a href="https://www.twitter.com/processingOrg/status/' + tweet.id_str + '">' + timeText + '<\/a>';
|
||||
tweet_html += '<\/div><\/li>';
|
||||
|
||||
$('.latest-tweets').append(tweet_html)
|
||||
})
|
||||
})
|
||||
|
||||
// recent commits
|
||||
$.getJSON('/content/static/feeds/github.php', function(data) {
|
||||
$.each(data, function(i, commit) {
|
||||
if(i<=3){
|
||||
var time = parse_date(commit.commit.committer.date);
|
||||
var timeText = format_relative_time(extract_relative_time(time));
|
||||
|
||||
var commit_html = '<li><img class="github-avatar" src="https://www.gravatar.com/avatar/' + commit.author.gravatar_id + '?s=20"/>';
|
||||
commit_html += '<div><a href="' + commit.author.html_url + '">' + commit.author.login + '<\/a> committed';
|
||||
commit_html += ' <a href="https://github.com/processing/processing/commit/' + commit.sha + '">"' + commit.commit.message + '"<\/a>';
|
||||
commit_html += ' about ' + timeText + '<\/div>';
|
||||
|
||||
$('.latest-commits').append(commit_html)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Functions
|
||||
|
||||
/* Twitter Parsing Functions */
|
||||
String.prototype.parseUsername = function() {
|
||||
return this.replace(/[@]+[A-Za-z0-9-_]+/g, function(u) {
|
||||
var username = u.replace("@","")
|
||||
return u.link("http://twitter.com/"+username);
|
||||
});
|
||||
};
|
||||
String.prototype.parseHashtag = function() {
|
||||
return this.replace(/[#]+[A-Za-z0-9-_]+/g, function(t) {
|
||||
var tag = t.replace("#","%23")
|
||||
return t.link("http://search.twitter.com/search?q="+tag);
|
||||
});
|
||||
};
|
||||
String.prototype.parseURL = function() {
|
||||
return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&~\?\/.=]+/g, function(url) {
|
||||
return url.link(url);
|
||||
});
|
||||
};
|
||||
|
||||
/* Time Parsing */
|
||||
function parse_date(date_str) {
|
||||
return Date.parse(date_str.replace(/^([a-z]{3})( [a-z]{3} \d\d?)(.*)( \d{4})$/i, '$1,$2$4$3'));
|
||||
}
|
||||
function extract_relative_time(date) {
|
||||
var toInt = function(val) { return parseInt(val, 10); };
|
||||
var relative_to = new Date();
|
||||
var delta = toInt((relative_to.getTime() - date) / 1000);
|
||||
if (delta < 1) delta = 0;
|
||||
return {
|
||||
days: toInt(delta / 86400),
|
||||
hours: toInt(delta / 3600),
|
||||
minutes: toInt(delta / 60),
|
||||
seconds: toInt(delta)
|
||||
};
|
||||
}
|
||||
function format_relative_time(time_ago) {
|
||||
if ( time_ago.days > 2 ) return ' ' + time_ago.days + ' days ago';
|
||||
if ( time_ago.hours > 24 ) return ' a day ago';
|
||||
if ( time_ago.hours > 2 ) return ' ' + time_ago.hours + ' hours ago';
|
||||
if ( time_ago.minutes > 45 ) return ' an hour ago';
|
||||
if ( time_ago.minutes > 2 ) return ' ' + time_ago.minutes + ' minutes ago';
|
||||
if ( time_ago.seconds > 1 ) return ' ' + time_ago.seconds + ' seconds ago';
|
||||
return 'just now';
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/***
|
||||
Simple jQuery Slideshow Script
|
||||
Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc. Please link out to me if you like it :)
|
||||
***/
|
||||
|
||||
function slideSwitch() {
|
||||
var $active = $('#slideshow IMG.active');
|
||||
|
||||
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
|
||||
|
||||
// use this to pull the images in the order they appear in the markup
|
||||
var $next = $active.next().length ? $active.next()
|
||||
: $('#slideshow IMG:first');
|
||||
|
||||
// uncomment the 3 lines below to pull the images in random order
|
||||
|
||||
// var $sibs = $active.siblings();
|
||||
// var rndNum = Math.floor(Math.random() * $sibs.length );
|
||||
// var $next = $( $sibs[ rndNum ] );
|
||||
|
||||
|
||||
$active.addClass('last-active');
|
||||
|
||||
$next.css({opacity: 0.0})
|
||||
.addClass('active')
|
||||
.animate({opacity: 1.0}, 1000, function() {
|
||||
$active.removeClass('active last-active');
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
setInterval( "slideSwitch()", 5000 );
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user