- Use a four space indent.
- Terminate all statements with a semicolon
;
- Curly braces should open on the same line and close on a new line
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) { | |
/******/ return installedModules[moduleId].exports; |
/* | |
* AUTOGENERATED FROM GENERATE-SERVICE-WORKER | |
*/ | |
const $VERSION = '26f8b6b6d92f0e7d7b7dc5ccae53d58f'; | |
const $DEBUG = false; | |
const $Cache = { | |
"precache": [ | |
"https://s.pinimg.com/webapp/js/entryChunk-react-common-5c5fb1fe655d0e4956c2.js", | |
"https://s.pinimg.com/webapp/js/vendor-react-6f23018b1ba21a553ff6.js", |
!function() { | |
var o; | |
o = function() { | |
console.log("this is a cool function called fun1!"); | |
}; | |
var n; | |
n = function() { | |
console.log("this is a cool function called fun2!"); | |
}; | |
var c; |
1. Create a bookmark with url the contents of webcast-bookmarklet. | |
2. Click on the bookmark when you're on the ivle webcast page. |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(3000); |
https://ivle.nus.edu.sg/api/Lapi.svc/Modules?APIKey={{ api key }}&AuthToken={{ auth token }}&Duration=0&IncludeAllInfo=false&output=json |
app.get('/', function(req, res){ | |
var ua = req.header('user-agent'); | |
if(/mobile/i.test(ua)) { | |
res.render('mobile.html'); | |
} else { | |
res.render('desktop.html'); | |
} | |
}); |
({ | |
baseUrl: ".", | |
name: "main", | |
out: "../../build/js/main.js", | |
paths: { | |
'jquery': "empty:", | |
'underscore': "libs/underscore", | |
'backbone': "libs/backbone", | |
'ich': "libs/icanhazamd", | |
'ivle': "libs/ivle", |
require.config({ | |
paths: { | |
// i use jquery cdn to speed up my page load | |
'jquery': "http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min", | |
'underscore': "libs/underscore", | |
'backbone': "libs/backbone", | |
// other scripts | |
'ich': "libs/icanhazamd", |