Update loadPref.js

changed to ancestorOrigins to remove security issue and broken code