Note: Office only
mso-ansi-font-size: large | larger | <length> | medium | <percentage> | small | smaller | x-large | x-small | xx-large | xx-small
| .comPlainTextContentEditable { | |
| -webkit-user-modify: read-write-plaintext-only; | |
| } | |
| .comPlainTextContentEditable--has-placeholder::before { | |
| content: attr(placeholder); | |
| opacity: 0.5; | |
| color: inherit; | |
| cursor: text; | |
| } |
| <meta charset="UTF-8"> | |
| <script src="https://npmcdn.com/mithril@0.2.5/mithril.js"></script> | |
| <script src="https://npmcdn.com/msx@0.4.1/dist/MSXTransformer.js"></script> | |
| <div id="app"></div> | |
| <script type="text/msx;harmony=true">void function() { 'use strict'; | |
| var App = { | |
| view(ctrl, attrs) { | |
| return <h1>Hello {attrs.who}!</h1> | |
| } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var UndoMixin = { | |
| getInitialState: function() { | |
| return { | |
| undo: [] | |
| }; | |
| }, | |
| handleUndo: function() { | |
| if (this.state.undo.length === 0) { | |
| return; |
| /** @jsx React.DOM */ | |
| var STATES = [ | |
| 'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', | |
| 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', | |
| 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', | |
| 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY' | |
| ] | |
| var Example = React.createClass({ |
| var ngAppElem = angular.element(document.querySelector('[ng-app]') || document); | |
| window.$injector = ngAppElem.injector(); | |
| window.inject = $injector.invoke; | |
| window.$rootScope = ngAppElem.scope(); | |
| // getService('auth') will create a variable `auth` assigned to the service `auth`. | |
| var getService = serviceName => | |
| inject([serviceName, s => window[serviceName] = s]); |
| // Returns a function, that, as long as it continues to be invoked, will not | |
| // be triggered. The function will be called after it stops being called for | |
| // N milliseconds. If `immediate` is passed, trigger the function on the | |
| // leading edge, instead of the trailing. | |
| angular.module('ngDebounce', []).factory('$debounce', function($timeout, $q) { | |
| return function(func, wait, immediate) { | |
| var timeout; | |
| var deferred = $q.defer(); | |
| return function() { | |
| var context = this, args = arguments; |
| // 1. Go to page https://www.linkedin.com/settings/email-frequency | |
| // 2. You may need to login | |
| // 3. Open JS console | |
| // ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
| // 4. Copy the following code in and execute | |
| // 5. No more emails | |
| // | |
| // Bookmarklet version: | |
| // http://chengyin.github.io/linkedin-unsubscribed/ |