You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.3 KiB
HTML
56 lines
1.3 KiB
HTML
<html>
|
|
<head>
|
|
<script src="libs/vibrant.min.js"></script>
|
|
<script>
|
|
Window.this.uniqueid = "init";
|
|
[ Window.share.CommonNative,
|
|
Window.share.MainNative,
|
|
Window.share.ChatNative,
|
|
Window.share.ViewInfoNative,
|
|
Window.share.PrefsNative
|
|
] = Window.this.xcall("getNativeApis");
|
|
Window.share.commonSettings = {
|
|
supportAvatars: true,
|
|
avatarShowInHint: true,
|
|
avatarUsePalette: false,
|
|
animateWindows: true,
|
|
animatedScroll: true,
|
|
quitConfirmation: false,
|
|
alertTopMost: false,
|
|
newSettings: true
|
|
};
|
|
|
|
function initCommonSettings(sets) {
|
|
Window.share.commonSettings = sets;
|
|
}
|
|
|
|
function getImageColors(image) {
|
|
var vibrant = new Vibrant(Graphics.Image.fromBytes(image));
|
|
var swatches = vibrant.swatches();
|
|
|
|
// for (var swatch in swatches)
|
|
// if (swatches[swatch])
|
|
// console.log(swatch + ": " + swatches[swatch].getHex());
|
|
// else
|
|
// console.log(swatch + ": undefined");
|
|
|
|
var swt = null;
|
|
if (swatches.Muted)
|
|
swt = swatches.Muted;
|
|
else if (swatches.DarkVibrant)
|
|
swt = swatches.DarkVibrant;
|
|
else if (swatches.Vibrant)
|
|
swt = swatches.Vibrant;
|
|
else if (swatches.DarkMuted)
|
|
swt = swatches.DarkMuted;
|
|
|
|
if (swt !== null)
|
|
return [swt.getHex(), swt.getTitleTextColor()];
|
|
else
|
|
return [];
|
|
}
|
|
</script>
|
|
<include src="common.htm" />
|
|
</head>
|
|
<body></body>
|
|
</html> |