forked from SFS/LightDMMock
Adds a safety check.
This commit is contained in:
parent
1613e868c2
commit
de77e4a072
@ -11,7 +11,10 @@
|
|||||||
* Include the file in your theme that needs mocking
|
* Include the file in your theme that needs mocking
|
||||||
* <script type="text/javascript" src="mock/LightDMMock.js"></script>
|
* <script type="text/javascript" src="mock/LightDMMock.js"></script>
|
||||||
* Create a new instance of LightDMMock
|
* Create a new instance of LightDMMock
|
||||||
* var lightdm = lightdm || new LightDMMock(autofill, timeout, autoGuest);
|
* if(!("lightdm" in window)) {
|
||||||
|
* var LightDMMock = LightDMMock || {};
|
||||||
|
* window.lightdm = new LightDMMock(autofill, timeout, autoGuest);
|
||||||
|
* }
|
||||||
*
|
*
|
||||||
* @param {boolean} autofill [wether or not the arrays for users, languages,
|
* @param {boolean} autofill [wether or not the arrays for users, languages,
|
||||||
* layouts, and sessions need to be filled with mock
|
* layouts, and sessions need to be filled with mock
|
||||||
|
@ -12,7 +12,10 @@ git clone git@github.com:CytoDev/LightDMMock.git
|
|||||||
````
|
````
|
||||||
3. Create a new instance of LightDMMock
|
3. Create a new instance of LightDMMock
|
||||||
````javascript
|
````javascript
|
||||||
var lightdm = lightdm || new LightDMMock(autofill, timeout, autoGuest);
|
if(!("lightdm" in window)) {
|
||||||
|
var LightDMMock = LightDMMock || {};
|
||||||
|
window.lightdm = new LightDMMock(autofill, timeout, autoGuest);
|
||||||
|
}
|
||||||
````
|
````
|
||||||
|
|
||||||
##Parameters of LightDMMock()
|
##Parameters of LightDMMock()
|
||||||
|
Loading…
Reference in New Issue
Block a user