├── icon.png
├── icon2.png
├── icon3.png
├── icon4.png
├── icon5.png
├── icon6.png
├── Daily Prayer Time.crx
├── backgroundPhoto9.jpg
├── NotificationSound
└── solemn.mp3
├── screenshots
├── screenshot_1.png
├── screenshot_2.png
└── screenshot_3.png
├── index.html
├── newScript.js
├── style.css
├── background.html
├── manifest.json
├── Daily Prayer Time.pem
├── README.md
├── popup.html
├── options.html
├── popup.js
├── options.js
├── background.js
└── Library
├── bootstrap.min.js
└── jquery-3.2.0.min.js
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/icon.png
--------------------------------------------------------------------------------
/icon2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/icon2.png
--------------------------------------------------------------------------------
/icon3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/icon3.png
--------------------------------------------------------------------------------
/icon4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/icon4.png
--------------------------------------------------------------------------------
/icon5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/icon5.png
--------------------------------------------------------------------------------
/icon6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/icon6.png
--------------------------------------------------------------------------------
/Daily Prayer Time.crx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/Daily Prayer Time.crx
--------------------------------------------------------------------------------
/backgroundPhoto9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/backgroundPhoto9.jpg
--------------------------------------------------------------------------------
/NotificationSound/solemn.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/NotificationSound/solemn.mp3
--------------------------------------------------------------------------------
/screenshots/screenshot_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/screenshots/screenshot_1.png
--------------------------------------------------------------------------------
/screenshots/screenshot_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/screenshots/screenshot_2.png
--------------------------------------------------------------------------------
/screenshots/screenshot_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nowshad-hasan/Daily-Prayer-Time/master/screenshots/screenshot_3.png
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
32 |
33 |
37 |
Daily Prayer Times
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
Fazr Prayer
47 |
48 |
49 |
50 |
51 |
52 |
53 |
Juma Prayer
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
Duhr Prayer
66 |
67 |
68 |
69 |
70 |
71 |
72 |
Asr Prayer
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
Magrib Prayer
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
Isha Prayer
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
Settings
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/options.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
39 |
59 |
60 |
61 |
62 |
63 | Show notification before mins
64 |
65 |
66 | Notification Sound
67 |
68 |
69 |
70 |
71 |
72 |
73 |
76 |
77 |
83 |
84 |
87 |
Instructions
88 |
89 |
90 |
91 |
92 |
93 | Make sure you are connected to internet for 'First Time Launch' and 'Reset Default'.
94 |
95 |
96 |
97 |
98 |
99 |
101 |
102 |
103 | May be 'Default Prayer Time' does not match for your region. So, it is recommended that you set your own prayer timing manually.
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | Make sure, you give international time when to set manual prayer time. Otherwise, notification will trigger two times a day, AM & PM.
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/popup.js:
--------------------------------------------------------------------------------
1 |
2 | var value;
3 | var firstHour,firstMinute,secondHour,secondMinute,thirdHour,thirdMinute,fourthHour,fourthMinute,fifthHour,fifthMinute,
4 | sixthHour,sixthMinute;
5 |
6 | $(document).ready(function() {
7 |
8 |
9 | $('#openOptionsPage').click(
10 |
11 | function(){
12 |
13 | chrome.tabs.create({ url: "options.html" });
14 |
15 | }
16 | );
17 |
18 |
19 | chrome.storage.sync.get(['FirstHour'],function(items){
20 |
21 | console.log(items.FirstHour);
22 |
23 | if(items.FirstHour!=undefined || items.FirstHour!=null)
24 | {
25 |
26 | displayAnalogTime();
27 | }
28 |
29 |
30 | });
31 |
32 |
33 | function displayAnalogTime() {
34 |
35 | chrome.storage.sync.get(['FirstHour','FirstMinute','SecondHour','SecondMinute',
36 | 'ThirdHour','ThirdMinute','FourthHour','FourthMinute',
37 | 'FifthHour','FifthMinute','SixthHour','SixthMinute'
38 | ],function(items){
39 |
40 |
41 |
42 | firstHour=items.FirstHour;
43 | firstMinute=items.FirstMinute;
44 | secondHour=items.SecondHour;
45 | secondMinute=items.SecondMinute;
46 |
47 | thirdHour=items.ThirdHour;
48 | thirdMinute=items.ThirdMinute;
49 | fourthHour=items.FourthHour;
50 | fourthMinute=items.FourthMinute;
51 |
52 |
53 | fifthHour=items.FifthHour;
54 | fifthMinute=items.FifthMinute;
55 | sixthHour=items.SixthHour;
56 | sixthMinute=items.SixthMinute;
57 |
58 |
59 | console.log("From Popup "+firstHour+" "+firstMinute+" "+secondHour+ " "+secondMinute+" "+thirdHour+" "+thirdMinute+" "+fourthHour+
60 | " "+fourthMinute+" "+fifthHour+" "+fifthMinute+" "+ sixthHour+" "+sixthMinute);
61 |
62 | var canvasFirst = document.getElementById("canvasFirst");
63 | var ctxFirst = canvasFirst.getContext("2d");
64 | var radiusFirst = canvasFirst.height / 2;
65 | ctxFirst.translate(radiusFirst, radiusFirst);
66 | radiusFirst = radiusFirst * 0.90;
67 | //setInterval(drawClock1, 1000);
68 | //setInterval(drawClock2, 1000);
69 | drawClock1();
70 |
71 | function drawClock1() {
72 | console.log("Fazr");
73 | drawFace(ctxFirst, radiusFirst);
74 | drawNumbers(ctxFirst, radiusFirst);
75 | drawTime(ctxFirst, radiusFirst,firstHour,firstMinute);
76 | }
77 |
78 |
79 | var canvasSecond = document.getElementById("canvasSecond");
80 | var ctxSecond = canvasSecond.getContext("2d");
81 | var radiusSecond = canvasSecond.height / 2;
82 | ctxSecond.translate(radiusSecond, radiusSecond);
83 | radiusSecond = radiusSecond * 0.90;
84 | // setInterval(drawClock, 1000);
85 | drawClock2();
86 | function drawClock2() {
87 | console.log("Juma");
88 | drawFace(ctxSecond, radiusSecond);
89 | drawNumbers(ctxSecond, radiusSecond);
90 | drawTime(ctxSecond, radiusSecond,secondHour,secondMinute);
91 | }
92 |
93 | var canvasThird = document.getElementById("canvasThird");
94 | var ctxThird = canvasThird.getContext("2d");
95 | var radiusThird = canvasThird.height / 2;
96 | ctxThird.translate(radiusThird, radiusThird);
97 | radiusThird = radiusThird * 0.90;
98 |
99 |
100 |
101 | drawClock3();
102 |
103 | function drawClock3() {
104 | console.log("Duhr");
105 | drawFace(ctxThird, radiusThird);
106 | drawNumbers(ctxThird, radiusThird);
107 | drawTime(ctxThird, radiusThird,thirdHour,thirdMinute);
108 | }
109 |
110 |
111 | var canvasFourth = document.getElementById("canvasFourth");
112 | var ctxFourth = canvasFourth.getContext("2d");
113 | var radiusFourth = canvasFourth.height / 2;
114 | ctxFourth.translate(radiusFourth, radiusFourth);
115 | radiusFourth = radiusFourth * 0.90;
116 | // setInterval(drawClock, 1000);
117 | drawClock4();
118 | function drawClock4() {
119 | console.log("Asr");
120 | drawFace(ctxFourth, radiusFourth);
121 | drawNumbers(ctxFourth, radiusFourth);
122 | drawTime(ctxFourth, radiusFourth,fourthHour,fourthMinute);
123 | }
124 |
125 | var canvasFifth = document.getElementById("canvasFifth");
126 | var ctxFifth = canvasFifth.getContext("2d");
127 | var radiusFifth = canvasFifth.height / 2;
128 | ctxFifth.translate(radiusFifth, radiusFifth);
129 | radiusFifth = radiusFifth * 0.90;
130 |
131 | drawClock5();
132 |
133 | function drawClock5() {
134 | console.log("Magrib");
135 | drawFace(ctxFifth, radiusFifth);
136 | drawNumbers(ctxFifth, radiusFifth);
137 | drawTime(ctxFifth, radiusFifth,fifthHour,fifthMinute);
138 | }
139 |
140 |
141 | var canvasSixth = document.getElementById("canvasSixth");
142 | var ctxSixth = canvasSixth.getContext("2d");
143 | var radiusSixth = canvasSixth.height / 2;
144 | ctxSixth.translate(radiusSixth, radiusSixth);
145 | radiusSixth = radiusSixth * 0.90;
146 | // setInterval(drawClock, 1000);
147 | drawClock6();
148 | function drawClock6() {
149 | console.log("Isha");
150 | drawFace(ctxSixth, radiusSixth);
151 | drawNumbers(ctxSixth, radiusSixth);
152 | drawTime(ctxSixth, radiusSixth,sixthHour,sixthMinute);
153 | }
154 |
155 | });
156 |
157 | console.log("From Popup2 "+firstHour+" "+firstMinute+" "+secondHour+ " "+secondMinute);
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | }
166 |
167 | function drawFace(ctx, radius) {
168 | var grad;
169 | ctx.beginPath();
170 | ctx.arc(0, 0, radius, 0, 2 * Math.PI);
171 | ctx.fillStyle = 'white';
172 | ctx.fill();
173 | grad = ctx.createRadialGradient(0, 0, radius * 0.95, 0, 0, radius * 1.05);
174 | grad.addColorStop(0, '#333');
175 | grad.addColorStop(0.5, 'white');
176 | grad.addColorStop(1, '#333');
177 | ctx.strokeStyle = grad;
178 | ctx.lineWidth = radius * 0.1;
179 | ctx.stroke();
180 | ctx.beginPath();
181 | ctx.arc(0, 0, radius * 0.1, 0, 2 * Math.PI);
182 | ctx.fillStyle = '#333';
183 | ctx.fill();
184 | }
185 |
186 | function drawNumbers(ctx, radius) {
187 | var ang;
188 | var num;
189 | ctx.font = radius * 0.15 + "px arial";
190 | ctx.textBaseline = "middle";
191 | ctx.textAlign = "center";
192 | for (num = 1; num < 13; num++) {
193 | ang = num * Math.PI / 6;
194 | ctx.rotate(ang);
195 | ctx.translate(0, -radius * 0.85);
196 | ctx.rotate(-ang);
197 | ctx.fillText(num.toString(), 0, 0);
198 | ctx.rotate(ang);
199 | ctx.translate(0, radius * 0.85);
200 | ctx.rotate(-ang);
201 | }
202 | }
203 |
204 | function drawTime(ctx, radius,hour,minute) {
205 | var now = new Date();
206 | // var hour = 7;
207 | // var minute = 42;
208 | var second = 00;
209 | //hour
210 | hour = hour % 12;
211 | hour = (hour * Math.PI / 6) +
212 | (minute * Math.PI / (6 * 60)) +
213 | (second * Math.PI / (360 * 60));
214 | drawHand(ctx, hour, radius * 0.5, radius * 0.07);
215 | //minute
216 | minute = (minute * Math.PI / 30) + (second * Math.PI / (30 * 60));
217 | drawHand(ctx, minute, radius * 0.8, radius * 0.07);
218 | // second
219 | second = (second * Math.PI / 30);
220 | //drawHand(ctx, second, radius*0.9, radius*0.02);
221 | }
222 |
223 | function drawHand(ctx, pos, length, width) {
224 | ctx.beginPath();
225 | ctx.lineWidth = width;
226 | ctx.lineCap = "round";
227 | ctx.moveTo(0, 0);
228 | ctx.rotate(pos);
229 | ctx.lineTo(0, -length);
230 | ctx.stroke();
231 | ctx.rotate(-pos);
232 | }
233 |
234 | });
235 |
--------------------------------------------------------------------------------
/options.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 |
3 | //alert("options");
4 |
5 |
6 | var prayerTime,resetDefault;
7 |
8 | $( document ).ready(function() {
9 | // console.log( "ready!" );
10 |
11 | chrome.storage.sync.get([
12 | 'FirstHour','FirstMinute','SecondHour','SecondMinute',
13 | 'ThirdHour','ThirdMinute','FourthHour','FourthMinute',
14 | 'FifthHour','FifthMinute','SixthHour','SixthMinute',
15 | 'notificationsTime','notificationShowStatus','notificationSoundStatus'
16 | ], function(items) {
17 | console.log(items.FirstHour);
18 |
19 | $('#FirstHourManual').val(items.FirstHour);
20 | $('#FirstMinuteManual').val(items.FirstMinute);
21 | $('#SecondHourManual').val(items.SecondHour);
22 | $('#SecondMinuteManual').val(items.SecondMinute);
23 |
24 |
25 |
26 | $('#ThirdHourManual').val(items.ThirdHour);
27 | $('#ThirdMinuteManual').val(items.ThirdMinute);
28 | $('#FourthHourManual').val(items.FourthHour);
29 | $('#FourthMinuteManual').val(items.FourthMinute);
30 |
31 |
32 |
33 |
34 | $('#FifthHourManual').val(items.FifthHour);
35 | $('#FifthMinuteManual').val(items.FifthMinute);
36 | $('#SixthHourManual').val(items.SixthHour);
37 | $('#SixthMinuteManual').val(items.SixthMinute);
38 |
39 |
40 |
41 |
42 | $('#notificationTimeBefore').val(items.notificationsTime);
43 | $('#notificationShowStatus').prop('checked',items.notificationShowStatus);
44 | $('#notificationSoundStatus').prop('checked',items.notificationSoundStatus);
45 | //$('#notificationTimeBefore').val(items.notificationsTime);
46 |
47 | //$('.myCheckbox').prop('checked', true);
48 | //console.log(items.notificationShowStatus);
49 |
50 |
51 | // 'notificationsTime':$('#notificationTimeBefore').val(),
52 | // 'notificationShowStatus':$('#notificationShowStatus').is(':checked'),
53 | // 'notificationSoundStatus':$('#notificationSoundStatus').is(':checked')
54 |
55 | });
56 |
57 | });
58 |
59 | $('#buttonSaveManualTime').click(
60 |
61 | function(){
62 | //alert("stre5t");
63 | // var FazrPrayerHourSet=$('#FazrPrayerHourSet').val();
64 | // var FazrPrayerMinuteSet=$('#FazrPrayerMinuteSet').val();
65 | // var JumaPrayerHourSet=$('#JumaPrayerHourSet').val();
66 | // var JumaPrayerMinuteSet=$('#JumaPrayerMinuteSet').val();
67 | //console.log(FazrPrayerHourSet+FazrPrayerMinuteSet+JumaPrayerHourSet+JumaPrayerMinuteSet)
68 | //var flag=FazrPrayerHourSet;
69 | if(true)
70 | {
71 | chrome.storage.sync.set({
72 |
73 | 'manualTimingStatus':true,
74 |
75 | 'FirstHour': $('#FirstHourManual').val(),
76 | 'FirstMinute': $('#FirstMinuteManual').val(),
77 | 'SecondHour': $('#SecondHourManual').val(),
78 | 'SecondMinute': $('#SecondMinuteManual').val(),
79 |
80 | 'ThirdHour': $('#ThirdHourManual').val(),
81 | 'ThirdMinute': $('#ThirdMinuteManual').val(),
82 | 'FourthHour': $('#FourthHourManual').val(),
83 | 'FourthMinute': $('#FourthMinuteManual').val(),
84 |
85 |
86 | 'FifthHour': $('#FifthHourManual').val(),
87 | 'FifthMinute': $('#FifthMinuteManual').val(),
88 | 'SixthHour': $('#SixthHourManual').val(),
89 | 'SixthMinute': $('#SixthMinuteManual').val(),
90 |
91 |
92 | 'notificationsTime':$('#notificationTimeBefore').val(),
93 | 'notificationShowStatus':$('#notificationShowStatus').is(':checked'),
94 | 'notificationSoundStatus':$('#notificationSoundStatus').is(':checked')
95 |
96 | // 'FazrHour': FazrPrayerHourSet
97 | // 'FazrMinute': FazrPrayerMinuteSet,
98 | // 'JumaHour': JumaPrayerHourSet,
99 | // 'JumaMinute': JumaPrayerMinuteSet
100 |
101 | }, function() {
102 |
103 | console.log("Successfully manual time is saved !");
104 | alert("Successfully new settings is saved !");
105 | // chrome.storage.sync.get(['FazrHour','FazrMinute','JumaHour','JumaMinute'],function(time){
106 | // // $('#total').text(budget.total);
107 | // // $('#limit').text(budget.limit);
108 | // console.log(time.JumaPrayerMinuteSet);
109 | // });
110 |
111 | chrome.storage.sync.get([
112 | 'FirstHour'
113 | ], function(items) {
114 | console.log("OK"+items.FirstHour);
115 | });
116 |
117 |
118 | });
119 | }
120 | }
121 | );
122 |
123 | $('#buttonResetDefault').click(
124 |
125 | function(){
126 |
127 | //var resetDefault=true;
128 |
129 |
130 | resetDefault=setInterval(getPrayerTimes,1000);
131 |
132 |
133 | chrome.storage.sync.set({
134 | 'manualTimingStatus':false,
135 | 'notificationsTime':0,
136 | 'notificationSoundStatus':true,
137 | 'notificationShowStatus':true
138 |
139 |
140 | // 'FazrHour': FazrPrayerHourSet
141 | // 'FazrMinute': FazrPrayerMinuteSet,
142 | // 'JumaHour': JumaPrayerHourSet,
143 | // 'JumaMinute': JumaPrayerMinuteSet
144 |
145 | }, function() {
146 |
147 | console.log("Successfully Resetting default Done!");
148 |
149 | alert("Successfully Resetting to Default Done!");
150 |
151 |
152 |
153 |
154 | });
155 |
156 |
157 | });
158 |
159 | $('#buttonNotificationSettings').click(
160 | function(){
161 | //alert();
162 | console.log($('#notificationShowStatus').is(':checked')+$('#notificationTimeBefore').val()+$('#notificationSoundStatus').is(':checked'));
163 |
164 | chrome.storage.sync.set({
165 |
166 | 'notificationsTime':$('#notificationTimeBefore').val(),
167 | 'notificationShowStatus':$('#notificationShowStatus').is(':checked'),
168 | 'notificationSoundStatus':$('#notificationSoundStatus').is(':checked')
169 |
170 |
171 | }, function() {
172 |
173 | console.log("Successfully Notifications Setting Saved !!!");
174 |
175 |
176 | alert("Successfully Notifications Setting Saved !!!");
177 |
178 |
179 |
180 | });
181 |
182 |
183 | });
184 |
185 |
186 |
187 | function getPrayerTimes() {
188 |
189 | var anHttpRequest = new XMLHttpRequest();
190 |
191 |
192 | var HttpClientNew = function() {
193 |
194 |
195 |
196 | this.get = function(aUrl, aCallback) {
197 |
198 | anHttpRequest.onreadystatechange = function() {
199 | if (anHttpRequest.readyState == 4 && anHttpRequest.status == 200)
200 | aCallback(anHttpRequest.responseText);
201 | }
202 |
203 | anHttpRequest.open("GET", aUrl, true);
204 |
205 |
206 | anHttpRequest.send(null);
207 |
208 |
209 |
210 | }
211 | }
212 |
213 |
214 |
215 |
216 | var client = new HttpClientNew();
217 | client.get('http://api.aladhan.com/timingsByCity?city=Dhaka&country=AE&method=2', function(response) {
218 |
219 |
220 | //alert("Hey I'm OK now");
221 | var jsonObject = JSON.parse(anHttpRequest.responseText);
222 | console.log(jsonObject);
223 |
224 |
225 |
226 | var fajrPrayerTime = jsonObject.data.timings.Fajr;
227 | var JumaPrayerTime= "13.00";
228 | var duhrPrayerTime = jsonObject.data.timings.Dhuhr;
229 | var asrPrayerTime = jsonObject.data.timings.Asr;
230 | var magribPrayerTime = jsonObject.data.timings.Maghrib;
231 | var ishaPrayerTime = jsonObject.data.timings.Isha;
232 |
233 | prayerTime = [
234 | fajrPrayerTime,
235 | JumaPrayerTime,
236 | duhrPrayerTime,
237 | asrPrayerTime,
238 | magribPrayerTime,
239 | ishaPrayerTime
240 | ];
241 |
242 | if(prayerTime!=undefined)
243 | clearInterval(resetDefault);
244 |
245 | var firstHour=parseInt(prayerTime[0].charAt(0)+prayerTime[0].charAt(1));
246 | if(firstHour>12)
247 | firstHour=firstHour-12;
248 | var secondHour=parseInt(prayerTime[1].charAt(0)+prayerTime[1].charAt(1));
249 | if(secondHour>12)
250 | secondHour=secondHour-12;
251 | var thirdHour=parseInt(prayerTime[2].charAt(0)+prayerTime[2].charAt(1));
252 | if(thirdHour>12)
253 | thirdHour=thirdHour-12;
254 | var fourthHour=parseInt(prayerTime[3].charAt(0)+prayerTime[3].charAt(1));
255 | if(fourthHour>12)
256 | fourthHour=fourthHour-12;
257 | var fifthHour=parseInt(prayerTime[4].charAt(0)+prayerTime[4].charAt(1));
258 | if(fifthHour>12)
259 | fifthHour=fifthHour-12;
260 | var sixthHour=parseInt(prayerTime[5].charAt(0)+prayerTime[5].charAt(1));
261 | if(sixthHour>12)
262 | sixthHour=sixthHour-12;
263 |
264 | chrome.storage.sync.set({
265 | 'notificationsTime':0,
266 | // 'manualTimingStatus':true,
267 | 'FirstHour': parseInt(prayerTime[0].charAt(0)+prayerTime[0].charAt(1)),
268 | 'FirstMinute': parseInt(prayerTime[0].charAt(3)+prayerTime[0].charAt(4)),
269 |
270 | 'SecondHour': parseInt(prayerTime[1].charAt(0)+prayerTime[1].charAt(1)),
271 | 'SecondMinute':parseInt(prayerTime[1].charAt(3)+prayerTime[1].charAt(4)),
272 |
273 | 'ThirdHour': parseInt(prayerTime[2].charAt(0)+prayerTime[2].charAt(1)),
274 | 'ThirdMinute': parseInt(prayerTime[2].charAt(3)+prayerTime[2].charAt(4)),
275 |
276 | 'FourthHour': parseInt(prayerTime[3].charAt(0)+prayerTime[3].charAt(1)),
277 | 'FourthMinute':parseInt(prayerTime[3].charAt(3)+prayerTime[3].charAt(4)),
278 |
279 | 'FifthHour': parseInt(prayerTime[4].charAt(0)+prayerTime[4].charAt(1)),
280 | 'FifthMinute': parseInt(prayerTime[4].charAt(3)+prayerTime[4].charAt(4)),
281 |
282 | 'SixthHour': parseInt(prayerTime[5].charAt(0)+prayerTime[5].charAt(1)),
283 | 'SixthMinute':parseInt(prayerTime[5].charAt(3)+prayerTime[5].charAt(4)),
284 | // 'FazrMinute': FazrPrayerMinuteSet,
285 | // 'JumaHour': JumaPrayerHourSet,
286 | // 'JumaMinute': JumaPrayerMinuteSet
287 |
288 | }, function() {
289 |
290 | console.log("Successfully Saving Done From Background from Options !!!");
291 |
292 |
293 |
294 | });
295 |
296 | });
297 |
298 | if(prayerTime!=undefined)
299 | {
300 | //alert();
301 | // clearInterval(resetDefault);
302 | // firstTimeCheck=false;
303 | }
304 |
305 | }
306 |
307 | }
308 | );
309 |
--------------------------------------------------------------------------------
/background.js:
--------------------------------------------------------------------------------
1 | // alert(document.location);
2 |
3 |
4 | //var prayerTime;
5 |
6 | //var testing=2;
7 | //alert();
8 |
9 |
10 | chrome.storage.sync.set({
11 | // 'manualTimingStatus':false,
12 | 'notificationsTime':0,
13 | 'notificationSoundStatus':true,
14 | 'notificationShowStatus':true,
15 | 'FirstHour':12,
16 | 'FirstMinute':0,
17 | 'SecondHour':12,
18 | 'SecondMinute':0,
19 | 'ThirdHour':12,
20 | 'ThirdMinute':0,
21 | 'FourthHour':12,
22 | 'FourthMinute':0,
23 | 'FifthHour':12,
24 | 'FifthMinute':0,
25 | 'SixthHour':12,
26 | 'SixthMinute':0
27 | }, function() {
28 | console.log("Successfully Default Value set for the first time");
29 | });
30 |
31 |
32 | var optionsFirst = {
33 | type: "basic",
34 | title: "Prayer Time",
35 | message: "Fajr Prayer Time",
36 | iconUrl: "icon6.png"
37 | };
38 |
39 |
40 |
41 | var optionsSecond = {
42 | type: "basic",
43 | title: "Prayer Time",
44 | message: "Juma Prayer Time",
45 | iconUrl: "icon6.png"
46 | };
47 |
48 | var optionsThird = {
49 | type: "basic",
50 | title: "Prayer Time",
51 | message: "Dhuhr Prayer Time",
52 | iconUrl: "icon6.png"
53 | };
54 |
55 | var optionsFourth = {
56 | type: "basic",
57 | title: "Prayer Time",
58 | message: "Asr Prayer Time",
59 | iconUrl: "icon6.png"
60 | };
61 |
62 | var optionsFifth = {
63 | type: "basic",
64 | title: "Prayer Time",
65 | message: "Magrib Prayer Time",
66 | iconUrl: "icon6.png"
67 | };
68 |
69 | var optionsSixth = {
70 | type: "basic",
71 | title: "Prayer Time",
72 | message: "Isha Prayer Time",
73 | iconUrl: "icon6.png"
74 | };
75 |
76 |
77 |
78 | function creationCallback() {
79 |
80 | chrome.storage.sync.get([
81 | 'notificationSoundStatus'
82 | ], function(items) {
83 | console.log(items.notificationSoundStatus);
84 |
85 | if(items.notificationSoundStatus==true)
86 | {
87 | var audio = new Audio('/NotificationSound/solemn.mp3');
88 | audio.play();
89 | console.log("Popup done with alarm sound!");
90 | }
91 | else
92 | {
93 | console.log("Popup done without alarm sound!!");
94 | }
95 | });
96 |
97 | }
98 |
99 | var firstTimeCheck=true;
100 | if(firstTimeCheck)
101 | {
102 | prayerTimeInterval=setInterval(getPrayerTimes, 1000);
103 | }
104 |
105 |
106 | var time = setInterval(runFunction, 60000);
107 |
108 | // var time = setInterval(runFunction, 60000);
109 |
110 | var notificationsTime=0;
111 |
112 |
113 | // $.when(getPrayerTimes()).then(runFunction());
114 | var prayerTime;
115 | var manualTimingStatus;
116 | var prayerTimeInterval;
117 |
118 | var notificationsTimeFirstHour,notificationsTimeFirstMinute,notificationsTimeSecondHour,notificationsTimeSecondminute,
119 | notificationsTimeThirdHour,notificationsTimeThirdMinute,notificationsTimeFourthHour,notificationsTimeFourthminute,
120 | notificationsTimeFifthHour,notificationsTimeFifthMinute,notificationsTimeSixthHour,notificationsTimeSixthminute;
121 |
122 |
123 |
124 | function runFunction() {
125 |
126 | if(!firstTimeCheck){
127 | //alert("kjsdr");
128 |
129 | var date = new Date();
130 | console.log("Hour "+date.getHours()+" Minute "+date.getMinutes())
131 |
132 | var currentDay=date.getDay();
133 | console.log(currentDay);
134 |
135 |
136 |
137 | chrome.storage.sync.get([
138 | 'manualTimingStatus','FirstHour','FirstMinute','SecondHour','SecondMinute',
139 | 'ThirdHour','ThirdMinute','FourthHour','FourthMinute',
140 | 'FifthHour','FifthMinute','SixthHour','SixthMinute'
141 | ,'notificationsTime','notificationShowStatus','notificationSoundStatus'
142 | ], function(items) {
143 |
144 | // if(items.manualTimingStatus==false || items.manualTimingStatus==undefined)
145 | // {
146 | // prayerTimeInterval=setInterval(getPrayerTimes, 1000);
147 | // }
148 | //
149 | // else if(items.manualTimingStatus==true)
150 | if(true)
151 | {
152 | console.log("Notifications "+items.FirstHour);
153 | console.log("Notifications "+items.FirstMinute);
154 | console.log("Notifications "+items.SecondHour);
155 | console.log("Notifications "+items.SecondMinute);
156 |
157 | console.log("Notifications "+items.ThirdHour);
158 | console.log("Notifications "+items.ThirdMinute);
159 | console.log("Notifications "+items.FourthHour);
160 | console.log("Notifications "+items.FourthMinute);
161 |
162 | console.log("Notifications "+items.FifthHour);
163 | console.log("Notifications "+items.FifthMinute);
164 | console.log("Notifications "+items.SixthHour);
165 | console.log("Notifications "+items.SixthMinute);
166 |
167 |
168 | console.log("Notifications "+items.notificationsTime);
169 | notificationsTime=items.notificationsTime;
170 |
171 | if(items.notificationsTime==undefined)
172 | notificationsTime=0;
173 |
174 | notificationsTimeFirstMinute=items.FirstMinute-notificationsTime;
175 | notificationsTimeFirstHour=items.FirstHour;
176 | if(notificationsTimeFirstMinute<0)
177 | {
178 | notificationsTimeFirstMinute=60+notificationsTimeFirstMinute;
179 | notificationsTimeFirstHour--;
180 | if(notificationsTimeFirstHour<0)
181 | notificationsTimeFirstHour=24+notificationsTimeFirstHour;
182 | }
183 |
184 | notificationsTimeSecondminute=items.SecondMinute-notificationsTime;
185 | notificationsTimeSecondHour=items.SecondHour;
186 | if(notificationsTimeSecondminute<0)
187 | {
188 | notificationsTimeSecondminute=60+notificationsTimeSecondminute;
189 | notificationsTimeSecondHour--;
190 | if(notificationsTimeSecondHour<0)
191 | notificationsTimeSecondHour=24+notificationsTimeSecondHour;
192 | }
193 |
194 |
195 |
196 |
197 |
198 |
199 | notificationsTimeThirdMinute=items.ThirdMinute-notificationsTime;
200 | notificationsTimeThirdHour=items.ThirdHour;
201 | if(notificationsTimeThirdMinute<0)
202 | {
203 | notificationsTimeThirdMinute=60+notificationsTimeThirdMinute;
204 | notificationsTimeThirdHour--;
205 | if(notificationsTimeThirdHour<0)
206 | notificationsTimeThirdHour=24+notificationsTimeThirdHour;
207 | }
208 |
209 | notificationsTimeFourthminute=items.FourthMinute-notificationsTime;
210 | notificationsTimeFourthHour=items.FourthHour;
211 | if(notificationsTimeFourthminute<0)
212 | {
213 | notificationsTimeFourthminute=60+notificationsTimeFourthminute;
214 | notificationsTimeFourthHour--;
215 | if(notificationsTimeFourthHour<0)
216 | notificationsTimeFourthHour=24+notificationsTimeFourthHour;
217 | }
218 |
219 |
220 |
221 |
222 | notificationsTimeFifthMinute=items.FifthMinute-notificationsTime;
223 | notificationsTimeFifthHour=items.FifthHour;
224 | if(notificationsTimeFifthMinute<0)
225 | {
226 | notificationsTimeFifthMinute=60+notificationsTimeFifthMinute;
227 | notificationsTimeFifthHour--;
228 | if(notificationsTimeFifthHour<0)
229 | notificationsTimeFifthHour=24+notificationsTimeFourthHour;
230 | }
231 |
232 | notificationsTimeSixthminute=items.SixthMinute-notificationsTime;
233 | notificationsTimeSixthHour=items.SixthHour;
234 | if(notificationsTimeSixthminute<0)
235 | {
236 | notificationsTimeSixthminute=60+notificationsTimeSixthminute;
237 | notificationsTimeSixthHour--;
238 | if(notificationsTimeSixthHour<0)
239 | notificationsTimeSixthHour=24+notificationsTimeSixthHour;
240 | }
241 |
242 |
243 |
244 |
245 |
246 | console.log(" notificationsTimeFirstHour "+notificationsTimeFirstHour+" notificationsTimeFirstMinute "+notificationsTimeFirstMinute);
247 | console.log(" notificationsTimeSecondHour "+notificationsTimeSecondHour+" notificationsTimeSecondminute "+notificationsTimeSecondminute);
248 |
249 |
250 | console.log(" notificationsTimeThirdHour "+notificationsTimeThirdHour+" notificationsTimeThirdMinute "+notificationsTimeThirdMinute);
251 | console.log(" notificationsTimeFourthHour "+notificationsTimeFourthHour+" notificationsTimeFourthminute "+notificationsTimeFourthminute);
252 |
253 | console.log(" notificationsTimeFifthHour "+notificationsTimeFifthHour+" notificationsTimeFifthMinute "+notificationsTimeFifthMinute);
254 | console.log(" notificationsTimeSixthHour "+notificationsTimeSixthHour+" notificationsTimeSixthminute "+notificationsTimeSixthminute);
255 |
256 | if(items.notificationShowStatus==true && items.notificationShowStatus!=undefined)
257 | {
258 |
259 |
260 | if(date.getHours()==notificationsTimeFirstHour && date.getMinutes()==notificationsTimeFirstMinute)
261 | {
262 | chrome.notifications.create(optionsFirst, creationCallback);
263 | }
264 | else if(date.getHours()==notificationsTimeSecondHour && date.getMinutes()==notificationsTimeSecondminute && date.getDay==5)
265 | {
266 | chrome.notifications.create(optionsSecond, creationCallback);
267 | }
268 |
269 |
270 | else if(date.getHours()==notificationsTimeThirdHour && date.getMinutes()==notificationsTimeThirdMinute && date.getDay!=5)
271 | {
272 | chrome.notifications.create(optionsThird, creationCallback);
273 | }
274 | else if(date.getHours()==notificationsTimeFourthHour && date.getMinutes()==notificationsTimeFourthminute)
275 | {
276 | chrome.notifications.create(optionsFourth, creationCallback);
277 | }
278 |
279 |
280 | else if(date.getHours()==notificationsTimeFifthHour && date.getMinutes()==notificationsTimeFifthMinute)
281 | {
282 | chrome.notifications.create(optionsFifth, creationCallback);
283 | }
284 | else if(date.getHours()==notificationsTimeSixthHour && date.getMinutes()==notificationsTimeSixthminute)
285 | {
286 | chrome.notifications.create(optionsSixth, creationCallback);
287 | }
288 |
289 | }
290 |
291 | }
292 |
293 | });
294 |
295 | }
296 | }
297 |
298 | function getPrayerTimes() {
299 |
300 | var anHttpRequest = new XMLHttpRequest();
301 |
302 |
303 | var HttpClientNew = function() {
304 |
305 |
306 |
307 | this.get = function(aUrl, aCallback) {
308 |
309 | anHttpRequest.onreadystatechange = function() {
310 | if (anHttpRequest.readyState == 4 && anHttpRequest.status == 200)
311 | aCallback(anHttpRequest.responseText);
312 | }
313 |
314 | anHttpRequest.open("GET", aUrl, true);
315 |
316 |
317 | anHttpRequest.send(null);
318 |
319 |
320 |
321 | }
322 | }
323 |
324 |
325 |
326 |
327 | var client = new HttpClientNew();
328 | client.get('http://api.aladhan.com/timingsByCity?city=Dhaka&country=AE&method=2', function(response) {
329 |
330 |
331 | //alert("Hey I'm OK now");
332 | var jsonObject = JSON.parse(anHttpRequest.responseText);
333 | console.log(jsonObject);
334 |
335 |
336 |
337 | var fajrPrayerTime = jsonObject.data.timings.Fajr;
338 | var JumaPrayerTime= "13.00";
339 | var duhrPrayerTime = jsonObject.data.timings.Dhuhr;
340 | var asrPrayerTime = jsonObject.data.timings.Asr;
341 | var magribPrayerTime = jsonObject.data.timings.Maghrib;
342 | var ishaPrayerTime = jsonObject.data.timings.Isha;
343 |
344 | prayerTime = [
345 | fajrPrayerTime,
346 | JumaPrayerTime,
347 | duhrPrayerTime,
348 | asrPrayerTime,
349 | magribPrayerTime,
350 | ishaPrayerTime
351 | ];
352 |
353 | var firstHour=parseInt(prayerTime[0].charAt(0)+prayerTime[0].charAt(1));
354 | if(firstHour>12)
355 | firstHour=firstHour-12;
356 | var secondHour=parseInt(prayerTime[1].charAt(0)+prayerTime[1].charAt(1));
357 | if(secondHour>12)
358 | secondHour=secondHour-12;
359 | var thirdHour=parseInt(prayerTime[2].charAt(0)+prayerTime[2].charAt(1));
360 | if(thirdHour>12)
361 | thirdHour=thirdHour-12;
362 | var fourthHour=parseInt(prayerTime[3].charAt(0)+prayerTime[3].charAt(1));
363 | if(fourthHour>12)
364 | fourthHour=fourthHour-12;
365 | var fifthHour=parseInt(prayerTime[4].charAt(0)+prayerTime[4].charAt(1));
366 | if(fifthHour>12)
367 | fifthHour=fifthHour-12;
368 | var sixthHour=parseInt(prayerTime[5].charAt(0)+prayerTime[5].charAt(1));
369 | if(sixthHour>12)
370 | sixthHour=sixthHour-12;
371 |
372 | chrome.storage.sync.set({
373 | 'notificationsTime':0,
374 | // 'manualTimingStatus':true,
375 | 'FirstHour': parseInt(prayerTime[0].charAt(0)+prayerTime[0].charAt(1)),
376 | 'FirstMinute': parseInt(prayerTime[0].charAt(3)+prayerTime[0].charAt(4)),
377 |
378 | 'SecondHour': parseInt(prayerTime[1].charAt(0)+prayerTime[1].charAt(1)),
379 | 'SecondMinute':parseInt(prayerTime[1].charAt(3)+prayerTime[1].charAt(4)),
380 |
381 | 'ThirdHour': parseInt(prayerTime[2].charAt(0)+prayerTime[2].charAt(1)),
382 | 'ThirdMinute': parseInt(prayerTime[2].charAt(3)+prayerTime[2].charAt(4)),
383 |
384 | 'FourthHour': parseInt(prayerTime[3].charAt(0)+prayerTime[3].charAt(1)),
385 | 'FourthMinute':parseInt(prayerTime[3].charAt(3)+prayerTime[3].charAt(4)),
386 |
387 | 'FifthHour': parseInt(prayerTime[4].charAt(0)+prayerTime[4].charAt(1)),
388 | 'FifthMinute': parseInt(prayerTime[4].charAt(3)+prayerTime[4].charAt(4)),
389 |
390 | 'SixthHour': parseInt(prayerTime[5].charAt(0)+prayerTime[5].charAt(1)),
391 | 'SixthMinute':parseInt(prayerTime[5].charAt(3)+prayerTime[5].charAt(4)),
392 | // 'FazrMinute': FazrPrayerMinuteSet,
393 | // 'JumaHour': JumaPrayerHourSet,
394 | // 'JumaMinute': JumaPrayerMinuteSet
395 |
396 | }, function() {
397 |
398 | console.log("Successfully Saving Done From Background !!!");
399 |
400 |
401 |
402 | });
403 |
404 | });
405 |
406 | if(prayerTime!=undefined)
407 | {
408 | //alert();
409 | clearInterval(prayerTimeInterval);
410 | firstTimeCheck=false;
411 | }
412 |
413 | }
414 |
--------------------------------------------------------------------------------
/Library/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.7 (http://getbootstrap.com)
3 | * Copyright 2011-2016 Twitter, Inc.
4 | * Licensed under the MIT license
5 | */
6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j