Completed
Pull Request — master (#90)
by Janis
15:10
created

js/temp/main.js   A

Complexity

Total Complexity 6
Complexity/F 3

Size

Lines of Code 26
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 6
dl 0
loc 26
rs 10
c 0
b 0
f 0
cc 0
nc 2
mnd 1
bc 5
fnc 2
bpm 2.5
cpm 3
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
B $(document).ready 0 19 5
1
/**
2
 * nextCloud - ocr
3
 *
4
 * This file is licensed under the Affero General Public License version 3 or
5
 * later. See the COPYING file.
6
 *
7
 * @author Janis Koehr <[email protected]>
8
 * @copyright Janis Koehr 2017
9
 */
10
(function (OC, OCA, window, $) {
11
	'use strict';
12
    /**
13
	 * Init the App
14
	 */
15
	$(document).ready(function () {
16
		/** We have to be in the Files App! */
17
		if (!OCA.Files || !OCA.Files.App.fileList) {
18
			return;
19
		}
20
		/** Escape when the requested file is public.php */
21
		if (/(public)\.php/i.exec(window.location.href) !== null) {
22
			return;
23
		}
24
		/** Check for namespace Ocr */
25
		if (!OCA.Ocr) {
26
			return;
27
		}
28
		// Create instance
29
		OCA.Ocr.$app = new OCA.Ocr.App();
30
		
31
		OCA.Ocr.$app.init();
32
33
	});
34
    	/** global: OC, OCA */
35
})(OC, OCA, window, jQuery);
36