Developed a gadget for the SV community, sorry for Vista only.
If you have any questions you can find me on chat.
fumanchu182 on December 11th, 2006 at 12:58:58 AM
You know I clicked submit by mistake and also wanted to say that this is not finished by any means, one thing I have to figure out is how to parse some strings so the maximum number of submissions is calculated right for selection processes, additionally the gadget model from Vista is all DOM/javascript/css.If you have any questions you can find me on chat.
fumanchu182 on December 31st, 1969 at 5:00:00 PM
I don't usually frequent the community as you can mostly find me on the chat channel but I have done some development on Vista and developed a neat little gadget. The gadget looks like so:http://www.subvariance.com/items/med/fumanchu182_16585.jpg
/>
Additionally when you click on the url it opens up a window that contains the url so take for example this picture:
http://www.subvariance.com/items/med/fumanchu182_29001.jpg
/>
Now some of you may ask if it updates every 60 seconds even if the gadget is not viewable and the answer is now (I programmed it with resources in mind). Additionally i have more plans to make a thumbnail of a random image appear when the link is clicked instead of opening a window (or have that as an option that a user selects). I also like to hear feedback from experts so if anyone wants to look at my code it is pasted as follows:
<html>
<head>
<title>Random Subvariance</title>
<!-- Gadget style goes here -->
<style>
body {
margin: 0;
padding-left: 5px;
padding-top: 5px;
padding-right: 5px;
padding-bottom: 5px;
width: 320px;
height: 100px;
color: #000000;
text-align: center;
background: url('./bg.png');
background-repeat: no-repeat;
font: italic 900 12px arial;
}
div.content
{
background: transparent;
width: 320;
position: absolute;
top: 77px;
left: 0px;
padding: none;
text-align: center;
color: #000000;
}
a {
text-decoration: none;
color: #000000;
}
</style>
<!-- Script information goes here -->
<script type="text/javascript">
var intervalID;
var waitTime = 60000;
var max = 3432;
var min = 100;
var random = 0;
var staticUrl = "http://www.subvariance.com/?f=3&id="
var finishedUrl = "";
var newDiv = null;
var my_div = null;
var visible = null;
function initialize()
{
//do some initialization stuff
System.Gadget.visibilityChanged = isVisible;
getrandomVariance();
intervalID = setInterval(getrandomVariance, waitTime);
}
function openAndUpdate()
{
window.open(finishedUrl, "randomVariance");
getrandomVariance();
clearInterval(intervalID);
intervalID = setInterval(getrandomVariance, waitTime);
}
function isVisible()
{
if (System.Gadget.visible)
{
visible = true;
}
else
{
visible = false;
}
}
function getrandomVariance()
{
random = Math.round((Math.random() * (max - min)) + min);
finishedUrl = staticUrl + random;
updateDiv(finishedUrl);
}
function updateDiv(url)
{
my_div = document.getElementById("first");
my_div.innerHTML = "<a name="test" onclick=openAndUpdate() >" + finishedUrl + "</a>";
}
</script>
</head>
<body onload="initialize()">
<div id="first" class="content"></div>
</body>
</html>