I'm creating a toolbar for my soon coming redesigned site Illing Spree and I want to make sure only the sites listed in the array "ill_members" will only load the bar, that way there's such things as an authorization. But I'm not exactly sure how to make these if statements. Can anyone help? :)
Also: This is all being written inside a JavaScript file, hence making a bootstrap so the other sites wouldn't go through the trouble of installing or working with upgrades.
var jQueryScriptOutputted=false;function initJQuery(){if(typeof jQuery=="undefined"){if(!jQueryScriptOutputted){jQueryScriptOutputted=true;document.write("<scr"+"ipt type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></scr"+"ipt>")}}else $(function(){})}initJQuery();
var ill_members = [
{name: "Illing Spree", link: "illingspree.com"},
{name: "WeAreRap.com", link: "wearerap.com"},
{name: "Gossip On Time", link: "gossipontime.com"}
];
var ill_music_members = [
{name: "WeAreRap.com", link: "wearerap.com"},
];
var dyno = "http://dyno.illingspree.com/toolbar/v0.1/";
var illBar = "<div id='illbar'><a id='illbar-logo' href='http://illingspree.com'></a></div>";
$(document).ready(function () {
$('head').append("<link rel='stylesheet' type='text/css' href='" + dyno + "tb.css'/>");
$('body').append(illBar);
});
I do not really see the need in Promoting it, at least not outside the EU where they have the prompt asking which browser you want to use. For the rest of us its pre-installed and just there. why advertise it lol.
Thanks, but the auto refresh of ads is something I can't change.. it has been this way even when we worked with Ziff Davis years ago, at the least the refreshing of the ads no longer messes with the page at all.
Also it is comical when I see an ad I want to click on or view, and then it refreshes before my eyes Lol. Btw I do not click on ads to generate revenue, just the ones that appeal to me, like when I am looking for a new wardrobe and then an ad appears for a sale on something local to me.
Question
Mr.XXIV
I'm creating a toolbar for my soon coming redesigned site Illing Spree and I want to make sure only the sites listed in the array "ill_members" will only load the bar, that way there's such things as an authorization. But I'm not exactly sure how to make these if statements. Can anyone help? :)
Also: This is all being written inside a JavaScript file, hence making a bootstrap so the other sites wouldn't go through the trouble of installing or working with upgrades.
var jQueryScriptOutputted=false;function initJQuery(){if(typeof jQuery=="undefined"){if(!jQueryScriptOutputted){jQueryScriptOutputted=true;document.write("<scr"+"ipt type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></scr"+"ipt>")}}else $(function(){})}initJQuery(); var ill_members = [ {name: "Illing Spree", link: "illingspree.com"}, {name: "WeAreRap.com", link: "wearerap.com"}, {name: "Gossip On Time", link: "gossipontime.com"} ]; var ill_music_members = [ {name: "WeAreRap.com", link: "wearerap.com"}, ]; var dyno = "http://dyno.illingspree.com/toolbar/v0.1/"; var illBar = "<div id='illbar'><a id='illbar-logo' href='http://illingspree.com'></a></div>"; $(document).ready(function () { $('head').append("<link rel='stylesheet' type='text/css' href='" + dyno + "tb.css'/>"); $('body').append(illBar); });Link to comment
https://www.neowin.net/forum/topic/1110673-javascript-array-match/Share on other sites
6 answers to this question
Recommended Posts