Skip to content

Instantly share code, notes, and snippets.

View Leoooob's full-sized avatar
Destroying bugs

Leon Hassan Leoooob

Destroying bugs
View GitHub Profile
Leoooob / .eslint.json
Created August 22, 2022 13:24
SAPUI5 eslint config template
"env": {
"browser": true
"globals": {
"sap": true,
"jQuery": true
"rules": {
"block-scoped-var": 1,
Leoooob / .prettierrc
Created August 22, 2022 13:21
A template Prettier config
"printWidth": 150,
"trailingComma": "none",
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"jsxBracketSameLine": true,
"arrowParens": "avoid"
Leoooob / main.js
Created March 18, 2019 13:15
SAPUI5 Fiori cross-app navigation example
//add _launchCrossApp() function to the base controller and invoke as below
const semanticObject = "MyCustomApp";
const semanticAction = "display";
let mParams = {};
mParams["myParameter"] = "myValue";
this._launchCrossApp(semanticObject, semanticAction, mParams);
// the function
Leoooob /
Last active February 5, 2018 12:31
Basic Service Worker implementation

Service Worker template

To implement this service worker in your project, you must copy the service-worker.js file to the root directory of the webapp/web page. You must then amend your index.html to contain the following script tag:

  // This makes sure that Service Workers are supported before registering.
  if ('serviceWorker' in navigator) {
 .then((registration) =&gt; {