It's not such a good idea to modify the dom of the current page from os.js, since that might affect other checks. Additionally you are setting the `ua_version` to 8 before you even validate anything, which feels wrong (I get how it works, the catch will overwrite `ua_version`, just strange). You should be able to use the `css_is_valid` method here:

    if (css_is_valid('display', 'display', 'table-cell')) {
      ua_version = '8.0';
    } else {
      ua_version = '7.0';
    }