The javascript I am using:
javascript: c = \'{unit}, ({coords}) {player} |{distance}| {return}\';
p = [\'Scout\', \'LC\', \'HC\', \'Axe\', \'Sword\', \'Ram\', \
In my case it was a conflict between slider and form validator as they were located on different pages but javascript file would of target both of them simultaneously, so all pages that had no slider would come up with "Cannot read property 'parentNode' of null" error, so I have added to the slider If statement:
if(document.getElementById("mainImage")){
var myImage = document.getElementById("mainImage");
var linkElement = myImage.parentNode;
that solved my problem, try it