-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.settings.js
executable file
·158 lines (129 loc) · 3.65 KB
/
app.settings.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/**
* GlobalQuran application settings
* @author Basit (i@basit.me || https://Basit.me)
*
* Online Quran Project
* https://GlobalQuran.com/
*
* Copyright 2011, imegah.com
* Simple Public License (Simple-2.0)
* https://www.opensource.org/licenses/Simple-2.0
*
*/
var config = {
/**
* set to true if you want to use Quran for offline, make sure you download all the Quran data and all.json file.
*/
offline: false,
/**
* api settings
*/
api: {
/**
* api key - required, from 4.0, they key is required for all api's request
*/
key: '',
/**
* supported version for this gq. this will pull data from the server according to its version.
*/
version: '4.0',
/**
* data api url
*/
url: 'https://api.globalquran.com/',
/**
* audioPath audio data api path
*/
audioPath: 'https://audio.globalquran.com/',
},
/**
* saving the current location to the bookmark if bookmark is enabled (true). false for disable
*/
bookmark: true,
/**
* control how url should be displayed or turn it off from here
*/
url: {
enable: true,
html5: false, // html5 replaces hash (!#) with backslashes /
/**
* puts backslash in the url, which can be used for sharing on facebook (lint feature). - requries .htaccess and metaTag plugin, to work properly.
* [NOTE] html5 must be set to true, for this to work
*
* '/'; - adds / slash before the page values
* '/subfolder/'; - if application is in the sub folder
* '?page='; - adds ?page= before the page values - useful, if htaccess is not allowed on server
*/
startWith: '/', // if html5 enabled, then starting url starts with / or subfolder name
/**
* 'page'; - url page by page navigation
* 'ayah'; - url ayah by ayah navigation
*/
by: 'page'
},
data: {
enable: true,
/**
* data api url
*/
url: 'https://api.globalquran.com/',
/**
* 'page'; - Get Quran page by page.
* 'surah'; - Get Quran surah by surah.
* 'juz'; - Get Quran juz by juz.
*/
by: 'page', // surah or page
/**
* pre-caching the data so next page / surah / juz loads quickly.
*
* false; - disable precache functionality
* true; - preload by above selected method. if it's page, then preload page, if its surah, then surah.
* 'page'; - Get Quran page by page.
* 'surah'; - Get Quran surah by surah.
* 'juz'; - Get Quran juz by juz.
* 'complete'; - Get Quran complete data.
*/
preload: true
},
player: {
/**
* off Toggle the player on and off
*/
enable: false,
/**
* start playing audio on start
* [Note] mobile dont support auto play, it must be gesture to play audio.
*/
autoPlay: false,
/**
* preload three different settings for this
* = true; - two players playing continuesly
* = false; - play with one and load with other one
* = -1; - just use only one player to play and load. This does not do preload. good for iphone or ipad
*/
preload: true,
/**
* swfPath flash player path for non html5 support
*/
swfPath: 'https://globalquran.com/img',
/**
* autoBitrate pass 'high' or 'low' for audio quality user wants
*/
autoBitrate: 'high', // high, low
/**
* id player div id
*/
id: '#audioPlayer',
/**
* id2 second player div id
*/
id2: '#audioPlayer2',
},
/**
* googleAnalyticsID google analytics id for counting visitors on the site and the event they do
*/
googleAnalyticsID: 'UA-1019966-3'
// keyword, url - change/format, player... other config
};
gq.setConfig(config); // set configuration
gq.start(); // start the application