| Total Complexity | 5 |
| Complexity/F | 1.25 |
| Lines of Code | 20 |
| Function Count | 4 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | // BigBlueButton open source conferencing system - http://www.bigbluebutton.org/. |
||
| 17 | $(document).on('turbolinks:load', function(){ |
||
| 18 | // Stores the current url when the user clicks the sign in button |
||
| 19 | $(".sign-in-button").click(function(){ |
||
| 20 | var url = location.href |
||
| 21 | // Add the slash at the end if it's missing |
||
| 22 | url += url.endsWith("/") ? "" : "/" |
||
| 23 | document.cookie ="return_to=" + url |
||
| 24 | }) |
||
| 25 | |||
| 26 | // Checks to see if the user provided an image url and displays it if they did |
||
| 27 | $("#user-image") |
||
| 28 | .on("load", function() { |
||
| 29 | $("#user-image").show() |
||
| 30 | $("#user-avatar").hide() |
||
| 31 | }) |
||
| 32 | .on("error", function() { |
||
| 33 | $("#user-image").hide() |
||
| 34 | $("#user-avatar").show() |
||
| 35 | }) |
||
| 36 | }) |
||
| 37 |