Skip to content

Instantly share code, notes, and snippets.

@shubhadeep
Created August 5, 2014 14:07
Show Gist options
  • Save shubhadeep/1eb00952ac55543558fb to your computer and use it in GitHub Desktop.
Save shubhadeep/1eb00952ac55543558fb to your computer and use it in GitHub Desktop.
This is a bookmarklet you can add to your browser bookmarks to boostrap OpenUI5 into the current browser tab. It also removes whatever is present in the document head and body.
javascript:(function () {
var body = document.body.parentElement.replaceChild(document.createElement('body'), document.body);
var head = document.head.parentElement.replaceChild(document.createElement('head'), document.head);
var bootstrap = document.createElement('script');
bootstrap.setAttribute('src', 'https://openui5.hana.ondemand.com/resources/sap-ui-core.js');
bootstrap.setAttribute('id', 'sap-ui-bootstrap');
bootstrap.setAttribute('data-sap-ui-theme', 'sap_bluecrystal');
bootstrap.setAttribute('data-sap-ui-libs', 'sap.m');
document.head.appendChild(bootstrap);
document.body.setAttribute('id', 'content');
document.body.setAttribute('class', 'sapUiBody');
})();void(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment