getInternalLink

Gets the element - internal document link of all, satisfying the specified conditions

Syntax

getInternalLink = function(aIndex, aAttributes, aValues, Strong,
  aAntiAttributes, aAntiValues, aAntiStrong);

Parameter

  • aIndex
    • functions: index of the desired element
  • aAttributes
    • functions: array of attributes of the desired element
  • aValues
    • functions: array of attribute values ​​corresponding to the array of attributes of the desired element
  • aStrong
    • functions: flag of match precision of the attribute values
  • aAntiAttributes
    • functions: array of exclusive attributes
  • aAntiValues
    • functions: array of values of exclusive attributes
  • aAntiStrong
    • functions: flag of match precision of the exclusive attribute values

Returned value

  • functions: структура, содержащая параметры найденного элемента

Notes

  • When searching for elements script enumerates all the elements that have values ​​aValues of aAttributes ​​attributes . Of these elements, the script selects the elements that are not have value aAntiValues ​​of aAntiAttributes attributes. If aStrong flag is true, the elements are found, the values ​​ aValues ​​of aAttributes properties of which are strictly equal to the specified (sensitive search is not considered). Otherwise, elements will be found in aAttributes property values of ​​which include the appropriate values ​​aValues. Similarly, with the flag aAntiStrong.
  • If the index of the desired element aIndex is -1, it will be obtained a random element from the found
  • If no elements are found, the fields of the resultant structure will be empty
  • Found elements will be highlighted by a dotted frame
  • Internal link - a link that refers to one of the documents of loaded site

Examples

  1. //Get a random element from all internal page links,
    //which have a value of "class" atribute equals "decorated"
    var link = getInternalLink(-1,['class'],['decorated'],true);