Methods
addAuthour(folderName, numImages, website, fullAuthourName)
Adds an Authour to the attribution array, including provided details.
Parameters:
Name | Type | Description |
---|---|---|
folderName |
string | the case-sensitive name of the directory of the authour being added |
numImages |
integer | the total number of images in the authour's directory |
website |
string | the website to link to for this authour |
fullAuthourName |
string | the professional name of this authour |
- Source:
addAuthourSpecialCase(folderName, fileExtension)
Adds special cases to the special case array for an entire authour folder contents. Used for specifying the file extension of every image from a certain authour that does not use the set default file extension.
Parameters:
Name | Type | Description |
---|---|---|
folderName |
string | the case-sensitive name of the directory of the images |
fileExtension |
string | the file extension to be used for this image, for example "png" or "jpg" |
- Source:
addImageSpecialCase(folderName, imageNumber, fileExtension)
Adds a special case to the special case array, including provided details. Used for specifying the file extension of a sinlge image that does not use the set default file extension.
Parameters:
Name | Type | Description |
---|---|---|
folderName |
string | the case-sensitive name of the directory of the image |
imageNumber |
integer | the number of the image in the directory |
fileExtension |
string | the file extension to be used for this image, for example "png" or "jpg" |
- Source:
checkForSpecialCase(folder, imageNum) → {string}
Checks if the image obtained by the folder and image number parameters has a special case attached.
Parameters:
Name | Type | Description |
---|---|---|
folder |
string | the directory containing the image in question |
imageNum |
integer | the number of the image in question in the directory |
- Source:
Returns:
fileExt - the correct file extension for this image
- Type
- string
getRandomRangeInt(min, max) → {integer}
Returns a random integer between minimum and maximum values inclusively.
Parameters:
Name | Type | Description |
---|---|---|
min |
integer | the minimum random number returned possible |
max |
integer | the maximim random number returned possible |
- Source:
Returns:
resuly - a random integer between min and max inclusive
- Type
- integer
setBackgroundImage(elementIdopt)
Randomly select and assign an available background image, credit authour appropriately if desired.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
elementId |
string |
<optional> |
"" | the optional id of HTML element to have it's href and inner HTML set to obtained attribution information |
- Source:
setDefaultFileType(newType)
Sets the default filetype to be used for any images that aren't a special case.
Parameters:
Name | Type | Description |
---|---|---|
newType |
string | the file extension to be set as default, for example "png" or "jpg" |
- Source:
setParentDirectoryPath(newPath)
Sets the directory name or path to the directory containing the authour folders.
Parameters:
Name | Type | Description |
---|---|---|
newPath |
string | the path to directory containing the authout folders, for example "/images" |
- Source: