Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #23 from Felizolinha/master
Browse files Browse the repository at this point in the history
URLs Clean Up
  • Loading branch information
Felizolinha committed Jan 27, 2015
2 parents 11fa88d + 75d09cc commit 3b10e00
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 24 deletions.
28 changes: 23 additions & 5 deletions originals/GRA0007/scratchultimate.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
// @version 0.2.1
// @description Useful Stuff
// @author GRA0007
// @contributor TheGameBuilder
// @match http://scratch.mit.edu/*
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant none
// ==/UserScript==

if(document.URL.indexOf("mystuff/") >= 0){
waitForKeyElements ("#tabs", appendSidebarItems);
}

if(document.URL.indexOf("users/") >= 0){
if(document.URL.indexOf("users/") >= 0){
waitForKeyElements ("#featured-project", liveFeaturedProject);
}

Expand All @@ -21,8 +21,26 @@ function appendSidebarItems(jNode) {
}

function liveFeaturedProject(jNode) {
var $projName = $('.project-name'),
projID = Scratch.INIT_DATA.PROFILE.featuredProject.id;
$('.player .title').css('text-align', 'center');
$projName.html($projName.html().trim()); //Make sure no whitespaces interefere with centering

jNode.remove();
var projID = Scratch.INIT_DATA.PROFILE.featuredProject.id
var usid = Scratch.INIT_DATA.PROFILE.featuredProject.creator
$( ".stage" ).append( "<iframe allowtransparency='true' width='282' height='210' src='http://scratch.mit.edu/projects/embed/" + projID + "/?autostart=true' frameborder='0' allowfullscreen=''></iframe>" );

$( ".stage" ).append( "<div style='overflow: hidden; height: 216px;' id='applet'><iframe style='margin-top: -25px;' allowtransparency='true' width='282' height='237' frameborder='0' allowfullscreen=''></iframe></div>" );

$('.stage iframe').load(function(){
var is404 = $(this).contents().find('#page-404').length > 0;
if(is404) {
$('.stage div').css('height', '211px');
$(this).css('margin-top', '-14px');
$(this).attr('height', '239');
$(this).attr('src', 'http://phosphorus.github.io/app.html?id=' + projID);
}
else if($(this).attr('src').indexOf('http://scratch.mit.edu/projects/embed/') > -1) {
setTimeout(function(){$('.stage iframe').attr('height', '238');}, 200);
}
});
$('.stage iframe').attr("src", "http://scratch.mit.edu/projects/embed/" + projID + "/?autostart=true");
}
37 changes: 18 additions & 19 deletions originals/djdolphin/scratchystuff.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,30 @@ window.location.search.replace(/([^?=&]+)(=([^&]*))?/g, function($0, $1, $2, $3)
var username = Scratch.INIT_DATA.LOGGED_IN_USER.model ? Scratch.INIT_DATA.LOGGED_IN_USER.model.username : null;

var extPresets = {
'Mesh': {url: 'https://raw.githubusercontent.com/bobbybee/mesh-2.0/master/ext.js', author: 'bobbybee'},
'Mesh': {url: 'https://cdn.rawgit.com/bobbybee/mesh-2.0/master/ext.js', author: 'bobbybee'},
'Scratch Cloud': {url: 'https://dl.dropboxusercontent.com/u/6274273/web/scratchcloud/icon.js', author: 'MathWizz'},
'Image Stuff': {url: 'http://scratch.cf/extensions/imagestuff.js', author: 'djdolphin'},
//'Image Stuff': {url: 'http://scratch.cf/extensions/imagestuff.js', author: 'djdolphin'},
'Cool helpful things extension': {url: 'http://textuploader.com/07bg/raw', author: 'PullJosh'},
'More Math': {url: 'http://savakamyimages00000.weebly.com/uploads/6/4/5/3/6453739/more_math.js', author: 'savaka'},
'Debugging': {url: 'http://savakamyimages00000.weebly.com/uploads/6/4/5/3/6453739/javascript_dialogs.js', author: 'savaka'},
'Javascript Dialogs': {url: 'http://savakamyimages00000.weebly.com/uploads/6/4/5/3/6453739/javascript_dialogs.js', author: 'savaka'},
'Link Opener': {url: 'http://savakamyimages00000.weebly.com/uploads/6/4/5/3/6453739/link_opener.js', author: 'savaka'},
'littleBits': {url: 'https://raw.githubusercontent.com/khanning/scratch-littlebits-extension/master/littlebits_extension.js', author: 'khanning'},
'Data Blocks': {url: 'https://raw.githubusercontent.com/Thepuzzlegame/My-Scratch-Extensions/master/data_extension.js', author: 'Thepuzzlegame'},
'Infinity Reporter': {url: 'https://raw.githubusercontent.com/Thepuzzlegame/My-Scratch-Extensions/master/infinity_reporter.js', author: 'Thepuzzlegame'},
'Extension Loader': {url: 'https://raw.githubusercontent.com/Thepuzzlegame/My-Scratch-Extensions/master/extension_loader.js', author: 'Thepuzzlegame'},
'Alarm extension': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/alarm_extension.js', author: 'sdg1'},
'Browser Stuff': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/browser_extension.js', author: 'grokblah'},
'Joystick': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/joystickExtension.js', author: 'sdg1'},
'Local Storage': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/localstorage_extension.js', author: 'sdg1'},
'PicoBoard': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/picoExtension.js', author: 'grokblah'},
'littleBits': {url: 'https://cdn.rawgit.com/khanning/scratch-littlebits-extension/master/littlebits_extension.js', author: 'khanning'},
//'Data Blocks': {url: 'https://raw.githubusercontent.com/Thepuzzlegame/My-Scratch-Extensions/master/data_extension.js', author: 'Thepuzzlegame'},
//'Infinity Reporter': {url: 'https://raw.githubusercontent.com/Thepuzzlegame/My-Scratch-Extensions/master/infinity_reporter.js', author: 'Thepuzzlegame'},
//'Extension Loader': {url: 'https://raw.githubusercontent.com/Thepuzzlegame/My-Scratch-Extensions/master/extension_loader.js', author: 'Thepuzzlegame'},
'Alarm extension': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/alarm_extension.js', author: 'sdg1'},
'Browser Stuff': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/browser_extension.js', author: 'grokblah'},
'Joystick': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/joystickExtension.js', author: 'sdg1'},
'Local Storage': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/localstorage_extension.js', author: 'sdg1'},
'PicoBoard': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/picoExtension.js', author: 'grokblah'},
'PicoBoard Fixed': {url: 'http://www.picaxe.com/downloads/scratch/scraxepicoextension.js', 'author': 'SCRAXE'},
'Power Extension': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/power_extension.js', author: 'sdg1'},
'Random wait extension': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/random_wait_extension.js', author: 'sdg1'},
'Speech to Text': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/speech_to_text_extension.js', author: 'sdg1'},
'Text to Speech': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/text_to_speech_extension.js', author: 'sdg1'},
'Text to Speech Simple': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/text_to_speech_simple_extension.js', author: 'sdg1'},
'Weather Extension': {url: 'https://raw.githubusercontent.com/LLK/scratch-extension-docs/master/weather_extension.js', author: 'sdg1'},
'ScratchExt': {url: 'http://stefanbates.com/library/import.js', author: 'GrannyCookies, Yoda3D, Thistleeverfreen'}
'Power Extension': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/power_extension.js', author: 'sdg1'},
'Random wait extension': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/random_wait_extension.js', author: 'sdg1'},
'Speech to Text': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/speech_to_text_extension.js', author: 'sdg1'},
'Text to Speech': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/text_to_speech_extension.js', author: 'sdg1'},
'Text to Speech Simple': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/text_to_speech_simple_extension.js', author: 'sdg1'},
'Weather Extension': {url: 'https://cdn.rawgit.com/LLK/scratch-extension-docs/master/weather_extension.js', author: 'sdg1'},
'ScratchExt': {url: 'http://stefanbates.com/library/install.js', author: 'GrannyCookies, Yoda3D, Thistleeverfreen'}
};
//Thanks, Thepuzzlegame!

Expand Down

0 comments on commit 3b10e00

Please sign in to comment.