64. if('querySelector' in document &&
'localStorage' in window &&
'addEventListener' in window &&
'classList' in document.documentElement &&
lpHostelMode() !== "light") {
}
Global feature switches
65. Authoring must stay the same
<div class=“my-module”>
<h1>{{ moduleTitle }}</h1>
{{ img_tag(moduleImage) }}
<p>{{ moduleContent }}</p>
</div>
66. Use helpers to abstract switches
def img_tag(image_url, opts={})
return if @hostelMode
!
image_tag(image_url, opts)
end