I found the exact error which I faced:
cannot read property 0 or null
on this line when the script tries to attach custom DOM elements:
site_options += '<option ' + selected + ' value="' + value.site + '">Show Only ' + value.site[0].toUpperCase() + value.site.substr(1) + '</option>';
And fixed that to check null before this line:
if(value.site != null)
site_options += '<option ' + selected + ' value="' + value.site + '">Show Only ' + value.site[0].toUpperCase() + value.site.substr(1) + '</option>';
Now it works.