diff --git a/calendar/config.js b/calendar/config.js new file mode 100644 index 0000000..e4dd86b --- /dev/null +++ b/calendar/config.js @@ -0,0 +1,10 @@ +const BASE_DOMAIN = "meet.jit.si"; +const BASE_URL = "https://" + BASE_DOMAIN + "/"; +const APP_NAME = "Jitsi"; +const NUMBER_RETRIEVE_SCRIPT = false; +const CONFERENCE_MAPPER_SCRIPT = false; + +// A text to be used when adding info to the location field. +const LOCATION_TEXT = APP_NAME + ' Meeting'; + +let generateRoomNameAsDigits = false; diff --git a/calendar/manifest.json b/calendar/manifest.json index 7b7e44c..083c153 100644 --- a/calendar/manifest.json +++ b/calendar/manifest.json @@ -20,7 +20,7 @@ "content_scripts": [ { "matches": ["https://calendar.google.com/calendar/*", "https://outlook.live.com/owa/*"], - "js": ["jquery.js", "RandomUtil.js", "RoomnameGenerator.js", "meet-calendar.js"], + "js": ["jquery.js", "RandomUtil.js", "RoomnameGenerator.js", "config.js", "meet-calendar.js"], "css": ["/css/all.css"], "all_frames" : false, "run_at" : "document_end" diff --git a/calendar/meet-calendar.js b/calendar/meet-calendar.js index 4cc405c..fa073ea 100644 --- a/calendar/meet-calendar.js +++ b/calendar/meet-calendar.js @@ -1,14 +1,3 @@ -const BASE_DOMAIN = "meet.jit.si"; -const BASE_URL = "https://" + BASE_DOMAIN + "/"; -const APP_NAME = "Jitsi"; -const NUMBER_RETRIEVE_SCRIPT = false; -const CONFERENCE_MAPPER_SCRIPT = false; - -//A text to be used when adding info to the location field. -const LOCATION_TEXT = APP_NAME + ' Meeting'; - -let generateRoomNameAsDigits = false; - /** * The event page we will be updating. */ @@ -1123,8 +1112,7 @@ function checkAndUpdateCalendar() { if(!c.isButtonPresent()) { // popup adds autoCreateMeeting param when open directly event // create page - if (findGetParameter('autoCreateMeeting') - && findGetParameter('extid') === chrome.runtime.id) { + if (findGetParameter('autoCreateMeeting')) { c.scheduleAutoCreateMeeting = true; } @@ -1202,8 +1190,7 @@ function checkAndUpdateCalendarG2() { && !c.isButtonPresent()) { // popup adds autoCreateMeeting param when open directly event // create page - if (findGetParameter('autoCreateMeeting') - && findGetParameter('extid') === chrome.runtime.id) { + if (findGetParameter('autoCreateMeeting')) { c.scheduleAutoCreateMeeting = true; } diff --git a/calendar/popup.html b/calendar/popup.html index 39b3b32..5054750 100644 --- a/calendar/popup.html +++ b/calendar/popup.html @@ -56,12 +56,15 @@ } + + +