designcreateplay/NodeBB — pull request #1134 by akhoury (2014-02-27 03:23:11+00:00)
Title: IE8 Support 

I need your help testing this to cover all the code paths that I’ve changed, I was able to lurk around with IE8, everything looks acceptable, but there is a couple of limitations, mentioned below.

Most of my changes are client side, so hopefully, the server shouldn’t crash, just keep your dev-tool console open while browsing for few days to spot client-side JS errors. Thank you

##### Emulating IE8 in IE11 will not work [MS bug](https://connect.microsoft.com/IE/feedback/details/806767/conditional-comments-do-not-work-when-emulating-document-modes-via-f12-developer-tools)
because it won't honor the conditional comments, so you need a real IE8 to test, or whatever else

### Some notes, which you may know already, but I’m going to say them anyways.

1. $(function(){…}) is short for $(document).ready(function(){..})
2. in JS logic, please try to make every HTMLElement a jQuery element, just for consistency, if you need the raw element, you can always $element[0] or $element.get(0)
3. Please stop using add/remove/EventListener it’s not cross browser
4. Please stop using get/set/remove/Attribute it’s not cross browser
5. single quotes dominates in NodeBB code base, so i say stick with that.
6. `var fn = function(){}` or `function fn(){}` ?

### What I did
1. changed all jQuery to $, I don’t have a preference, just saving few bytes with the $
2. Took out all the `createDocumentFragment()`, is it necessary? or is it just me? why not create elements and append on the fly? I changed most of the ones I saw, only because I was flipping the native elements to $() elements and didn’t want to clone the items per each iteration.
3. Added ES5, HTML5, and Respond.js scripts
added some ‘;’ where appropriate, along with conditionals in the composer.tpl
4. Added/removed some spacing to match the global styling
Clipboard Paste and Drag N Drop are broken on IE8/9 :/ these are going to need another iteration
5. changed some JS double-quotes “ to single-quotes where I saw them, most of the your code so far looks like it’s using single-quotes great, I don’t have a preference, but whatever dominates.
6. I added an `overrides.js` so you can put overrides in it, so I moved the `jQuery.fn.*` definitions out of utils to it.

### Limitations/Issues
1. Drag N Drop + Paste from clipboard is broken in IE8/9, maybe I should just hide it
2. Admin > Themes > Custom CSS is broken because tabIndent doesn’t support IE8 (mainly the `addEventListener` usage, from a quick peak at it)
3. base theme when using rgba should have a fallback to rob for IE8 i.e `.composer { background: rgb(224, 224, 224); rgba(224, 224, 224, 0.85); }` which is pending in this https://github.com/designcreateplay/nodebb-theme-vanilla/pull/8
4. on IE8 only, the Composer's IMAGE/FILE upload file pickers NEEDs to be opened via a click on the input file it self, so, on IE8, the `` is visible instead of the nice `fa` icons

### Side notes:
1. A lot of the HTML injection, in the future, can be achieved via smarter templates, can’t wait for dcp.templates to become a fully mature templating engine.
2. Maybe the `templates/` files should be refactored to directories each, with partials and such, this way we can decouple all the HTML injection from the JS, via templating, and iterations.. also would help in translating the JS injected HTML