Skip to content

Instantly share code, notes, and snippets.

@jfahrenkrug
Created August 2, 2011 09:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfahrenkrug/1119870 to your computer and use it in GitHub Desktop.
Save jfahrenkrug/1119870 to your computer and use it in GitHub Desktop.
Add custom icons to the iCloud.com CloudOS SpringBoard
SC.run(function() {
COS.apps.github = {path: 'http://www.github.com', requiredServices: ["ubiquity"]};
COS.appsController._appsInfo.github = COS.AppInfo.create(COS.apps.github);
var github = {name: 'github', icon: 'http://ripthejacker.github.com/images/github_icon.png'};
var c = {
maskAsset: "/system/cloudos/en-us/14F/source/resources/images/mask.png",
warningArrowAsset: "/system/cloudos/en-us/14F/source/resources/images/warning_arrow.png",
shadowAsset: "/system/cloudos/en-us/14F/source/resources/images/shadow.png",
focusAsset: "/system/cloudos/en-us/14F/source/resources/images/app_icon_ring.png",
spinnerAsset: "/system/cloudos/en-us/14F/source/resources/images/spinner.png",
minWidth: 1,
minHeight: 1
};
for (d in c) {
if (!github.hasOwnProperty(d)) {
github[d] = c[d]
}
}
SC.Locale.currentLocale.strings['AppTitle.github'] = 'Github';
CloudOS.displayApps.push(github);
CloudOS.mainPage.mainPane.springboardView.childViews.forEach(function(c) { if (SC.instanceOf(c, CloudOS.SpringboardButtonView)) { c.set('isVisible', false); }});
CloudOS.appController.initializeAppManagers();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment