|
49 | 49 | objbrowserName = M[0];
|
50 | 50 | objBrMajorVersion = M[1];
|
51 | 51 |
|
52 |
| - if ((objbrowserName == "Chrome" && objBrMajorVersion < {{allowed_min_browser_versions['chrome']}}) || |
53 |
| - (objbrowserName == "Firefox" && objBrMajorVersion < {{allowed_min_browser_versions['firefox']}}) || |
54 |
| - (objbrowserName == "Safari" && objBrMajorVersion < {{allowed_min_browser_versions['safari']}}) || |
55 |
| - ((objbrowserName == "IE" || objbrowserName == "MSIE") && objBrMajorVersion < {{allowed_min_browser_versions['IE']}})) { |
| 52 | + if ((objbrowserName == "Chrome" && objBrMajorVersion < {{allowed_min_browser_versions['chrome']}}) |
| 53 | + {% if 'firefox' in allowed_min_browser_versions %} |
| 54 | + || (objbrowserName == "Firefox" && objBrMajorVersion < {{allowed_min_browser_versions['firefox']}}) |
| 55 | + {% else %} |
| 56 | + || (objbrowserName == "Firefox") |
| 57 | + {% end %} |
| 58 | + {% if 'safari' in allowed_min_browser_versions %} |
| 59 | + || (objbrowserName == "Safari" && objBrMajorVersion < {{allowed_min_browser_versions['safari']}}) |
| 60 | + {% else %} |
| 61 | + || (objbrowserName == "Safari") |
| 62 | + {% end %} |
| 63 | + {% if 'IE' in allowed_min_browser_versions %} |
| 64 | + || ((objbrowserName == "IE" || objbrowserName == "MSIE") && objBrMajorVersion < {{allowed_min_browser_versions['IE']}}) |
| 65 | + {% else %} |
| 66 | + || (objbrowserName == "IE" || objbrowserName == "MSIE") |
| 67 | + {% end %} |
| 68 | + ) { |
56 | 69 | // Show overlay because too old a browser
|
57 | 70 | ol = document.getElementById("overlay");
|
58 | 71 | ol.style.visibility = "visible";
|
@@ -284,9 +297,15 @@ <h6>
|
284 | 297 | <img src="{% raw qiita_config.portal_dir %}{{portal_styling.logo}}" alt="Qiita logo" id="small-logo"/>
|
285 | 298 | <h1>This site only works with the following browsers</h1>
|
286 | 299 | <p id="explanation"><strong>Chrome >= {{allowed_min_browser_versions['chrome']}}:</strong> You can download Chrome from <a href="https://www.google.com/chrome/browser/">here</a> or you can find instructions on how to update it <a href="https://support.google.com/chrome/answer/95414?hl=en">here</a></p>
|
287 |
| - <p id="explanation"><strong>Safari >= {{allowed_min_browser_versions['safari']}}:</strong> You can update Safari following <a href="http://support.apple.com/en-us/HT6104">these</a> instructions.</p> |
288 |
| - <p id="explanation"><strong>Firefox >= {{allowed_min_browser_versions['firefox']}}:</strong> For instructions on how to install or update Firefox go <a href="https://support.mozilla.org/en-US/kb/update-firefox-latest-version">here.</a></p> |
289 |
| - <p id="explanation"><strong>Internet Explorer >= {{allowed_min_browser_versions['IE']}}:</strong> For instructions on how to update IE go <a href="http://windows.microsoft.com/en-us/internet-explorer">here.</a></p> |
| 300 | + {% if 'safari' in allowed_min_browser_versions %} |
| 301 | + <p id="explanation"><strong>Safari >= {{allowed_min_browser_versions['safari']}}:</strong> You can update Safari following <a href="http://support.apple.com/en-us/HT6104">these</a> instructions.</p> |
| 302 | + {% end %} |
| 303 | + {% if 'firefox' in allowed_min_browser_versions %} |
| 304 | + <p id="explanation"><strong>Firefox >= {{allowed_min_browser_versions['firefox']}}:</strong> For instructions on how to install or update Firefox go <a href="https://support.mozilla.org/en-US/kb/update-firefox-latest-version">here.</a></p> |
| 305 | + {% end %} |
| 306 | + {% if 'IE' in allowed_min_browser_versions %} |
| 307 | + <p id="explanation"><strong>Internet Explorer >= {{allowed_min_browser_versions['IE']}}:</strong> For instructions on how to update IE go <a href="http://windows.microsoft.com/en-us/internet-explorer">here.</a></p> |
| 308 | + {% end %} |
290 | 309 | </div>
|
291 | 310 | </body>
|
292 | 311 | </html>
|
0 commit comments