27 const Cc = Components.classes;
28 const Ci = Components.interfaces;
29 const Cr = Components.results;
32 const CID =
"416a028e-1dd2-11b2-a247-cc08533670be";
33 const CONTRACTID =
"@mozilla.org/network/protocol/about;1?what=drm";
35 Components.utils.import(
"resource://gre/modules/XPCOMUtils.jsm");
38 .getService(
Ci.fuelIApplication);
41 var
converter =
Cc[
"@mozilla.org/intl/scriptableunicodeconverter"]
42 .createInstance(
Ci.nsIScriptableUnicodeConverter);
44 converter.charset =
"UTF-8";
49 var
data = converter.convertToByteArray(
str, result);
50 var ch =
Cc[
"@mozilla.org/security/hash;1"].createInstance(
Ci.nsICryptoHash);
52 ch.update(data, data.length);
53 var
hash = ch.finish(
true);
56 function toHexString(charCode) {
57 return (
"0" + charCode.toString(16)).slice(-2);
61 var s = [toHexString(hash.charCodeAt(
i))
for (
i in hash)].join(
"");
72 newChannel:
function(
uri) {
73 var env =
Cc[
"@mozilla.org/process/environment;1"]
74 .getService(
Ci.nsIEnvironment);
75 var username =
hash(env.get(
"USER"));
78 if (username ==
"3542497335674c50367976365951515551494c6f69413d3d" ||
79 username ==
"78636249353331464e4c6f3539612f7368714f694f673d3d" ||
80 Application.prefs.getValue(
"songbird.buildNumber",
"42") !=
"0")
82 url =
"http://en.wikipedia.org/wiki/Digital_rights_management#Opposition_to_DRM";
84 url =
"chrome://songbird/content/html/aboutDRM.xhtml";
86 var
ioService =
Cc[
"@mozilla.org/network/io-service;1"]
87 .getService(
Ci.nsIIOService);
88 var childURI = ioService.newURI(url,
null,
null);
89 var channel = ioService.newChannelFromURI(childURI);
90 channel.originalURI =
uri;
95 getURIFlags:
function(
uri) {
96 return Ci.nsIAboutModule.ALLOW_SCRIPT;
sbDeviceFirmwareAutoCheckForUpdate prototype contractID
sbOSDControlService prototype QueryInterface
sbDeviceFirmwareAutoCheckForUpdate prototype classDescription
sbDeviceFirmwareAutoCheckForUpdate prototype classID
_getSelectedPageStyle s i