farhatahmad /
greenlight
| 1 | // BigBlueButton open source conferencing system - http://www.bigbluebutton.org/. |
||
| 2 | // |
||
| 3 | // Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below). |
||
| 4 | // |
||
| 5 | // This program is free software; you can redistribute it and/or modify it under the |
||
| 6 | // terms of the GNU Lesser General Public License as published by the Free Software |
||
| 7 | // Foundation; either version 3.0 of the License, or (at your option) any later |
||
| 8 | // version. |
||
| 9 | // |
||
| 10 | // BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY |
||
| 11 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
||
| 12 | // PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
||
| 13 | // |
||
| 14 | // You should have received a copy of the GNU Lesser General Public License along |
||
| 15 | // with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. |
||
| 16 | |||
| 17 | $(document).on('turbolinks:load', function(){ |
||
| 18 | $("#cookies-agree-button").click(function() { |
||
| 19 | //create a cookie that lasts 1 year |
||
| 20 | var cookieDate = new Date(); |
||
| 21 | cookieDate.setFullYear(cookieDate.getFullYear() + 1); //1 year from now |
||
| 22 | document.cookie = "cookie_consented=true; path=/; expires=" + cookieDate.toUTCString() + ";" |
||
| 23 | |||
| 24 | //hide the banner at the bottom |
||
| 25 | $(".cookies-banner").attr("style","display:none !important") |
||
| 26 | }) |
||
| 27 | |||
| 28 | $("#maintenance-close").click(function(event) { |
||
| 29 | //create a cookie that lasts 1 day |
||
| 30 | |||
| 31 | var cookieDate = new Date() |
||
| 32 | cookieDate.setDate(cookieDate.getDate() + 1) //1 day from now |
||
| 33 | console.log("maintenance_window=" + $(event.target).data("date") + "; path=/; expires=" + cookieDate.toUTCString() + ";") |
||
|
0 ignored issues
–
show
Debugging Code
introduced
by
Loading history...
|
|||
| 34 | |||
| 35 | document.cookie = "maintenance_window=" + $(event.target).data("date") + "; path=/; expires=" + cookieDate.toUTCString() + ";" |
||
| 36 | }) |
||
| 37 | }) |
||
| 38 |