Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var dict = {
- 'en' : {
- 'Chrome' : {
- 'default' : '16',
- '16' : {
- 'default' : 'Windows',
- 'Windows' : [
- "Click on the wrench button.",
- "Choose 'Options'",
- "Click on 'Under the Hood'",
- "Click on 'Clear browsing data...'",
- "Check <b>only</b> the \"Empty the cache\" checkbox and make sure the other checkboxes are not checked. Then click on 'Clear browsing data'."
- ]
- },
- 'logo' : 'chrome_logo.png'
- },
- 'Firefox' : {
- '10' : {
- 'default' : 'Windows',
- 'Windows' : [
- "Click on the Firefox menu.",
- "Click on the little arrow next to 'History'",
- "Choose 'Clear recent history'.",
- "Select 'Everything' in the 'Time range to clear' box.",
- "Check <b>only</b> the \"Cache\" checkbox and make sure the other checkboxes are not checked.",
- "Click on 'Clear Now'"
- ]
- },
- 'default' : '10',
- 'logo' : 'firefox.png'
- },
- 'Explorer' : {
- '9' : {
- 'default' : 'Windows',
- 'Windows' : [
- "Click on the tools button.",
- "Choose Internet Options.",
- "In the 'General' tab click on 'Delete...' button.",
- "Check the 'Temporary Internet files' checkbox and <b>un-check all others.</b>",
- "Click on 'Delete'."
- ]
- },
- 'default' : '9',
- 'logo' : 'ie.png'
- } }
- }
- function main()
- {
- var lang = 'en'; // Supporting other languages later...
- var key = dict[lang];
- var bro = BrowserDetect.browser;
- var version = BrowserDetect.version;
- var os = BrowserDetect.OS;
- if (!key[bro])
- {
- $(".identify").html("Your browser is " + bro + " " + version + " on " + os);
- setTimeout("window.location.href = 'http://www.clearbrowsercache.com/'", 2000);
- }
- if (!key[bro][version])
- version = key[bro]['default'];
- if (!key[bro][version][os])
- os = key[bro][version]['default'];
- steps = key[bro][version][os];
- logo = key[bro]['logo'];
- browserDir = lang + "/" + bro + "/";
- manualDir = browserDir + version + "/" + os + "/";
- $(".identify").html("Your browser is " + bro);
- $(".logo").append("<img src='" + browserDir + logo + "'></img>");
- for (var i in steps) {
- n = parseInt(i) + 1;
- step = '<li class="step">';
- step += "<div class='instruction'>" + steps[i] + "</div>";
- step += "<div class='illustration'><img src='" + manualDir + "image" + n.toString() + ".png'></img></div>"
- step += '</li>';
- $(".manual").append(step);
- }
- }
- main();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement