Opera And myspace?


Recommended Posts

When on myspace (not sure if anyone is familiar with the page) But i was wondering why there is an xml error in the flashplayer when loading the songs. I cannot listen to any of the bands songs using Opera, with internet explorer it is fine! Any suggestions, how to fix it would be awsome! Thanks <333 Brandon.

Link to comment
Share on other sites

Here's a user javascript that fixes the problem. It's not a problem with Opera (or FF for that matter), but rather because of bad coding on the webmasters part.

document.addEventListener("load", function () {
    var obj = document.getElementsByTagName("object");
    for (var i = 0; i &lt; obj.length; i++) {
        var param = obj[i].getElementsByTagName("param");
        for (var c = 0; c &lt; param.length; c++) {
            if ( (!obj[i].data || !obj[i].type) &amp;&amp; (param[c].getAttribute("name").toLowerCase() == "src" || param[c].getAttribute("name").toLowerCase() == "movie") ) {
                if (!obj[i].data) {
                    obj[i].data = param[c].getAttribute("value");
                }
                if (!obj[i].type) {
                    obj[i].type = param[c].getAttribute("type");
                }
                break;
            }
        }
        if (!obj[i].type &amp;&amp; obj[i].getAttribute("classid") ) {
            var id = obj[i].getAttribute("classid");
            if (id == "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000") {
                obj[i].type = "application/x-shockwave-flash";
            }
        }
        if (!obj[i].type &amp;&amp; obj[i].data.substring( obj[i].data.lastIndexOf(".") ).toLowerCase() == ".swf") {
            obj[i].type = "application/x-shockwave-flash";
        }
    }
}, false);

If you don't know how to use userjs, here's a how-to :)

(Credit for script: burnout426 of the official Opera forums).

Link to comment
Share on other sites

wow thank you very much :D! sorry for bumping and all...if theres anything you need (on reasonable groudns that is :p) just ask..your awsome!

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.