Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions dist/woof.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,9 @@ function Woof() {
});
};
document.body.addEventListener("keyup", thisContext._onKeyUpHandler);
}
});
// The following methods is where we keep track of user's events
);thisContext._onMouseMoves = [];
thisContext._onMouseMoves = [];
thisContext.onMouseMove = function (func) {
if (typeof func != "function") {
throw new TypeError("onMouseMove(function) requires one function input.");
Expand Down Expand Up @@ -1132,9 +1132,9 @@ Woof.prototype.Sprite = function () {
var data = _this.collisionContext.getImageData(canvasLeft, canvasTop, right - left, top - bottom).data;
} catch (e) {
if (e instanceof DOMException) {
console.warn("You have an image at an untrusted URL. Consider uploading to Imgur and using https."
console.warn("You have an image at an untrusted URL. Consider uploading to Imgur and using https.");
// bounds are overlapping and we can't get canvas data, so return true
);return true;
return true;
}
}

Expand Down Expand Up @@ -2164,6 +2164,14 @@ Woof.prototype.pow = function (a, b) {
return Math.pow(a, b);
};

var getData = function getData(url, callback) {
fetch(url, { mode: 'cors', header: { 'Access-Control-Allow-Origin': '*' } }).then(function (result) {
result.json().then(function (data) {
callback(data);
});
});
};

// find the woof.js script tag in the page
var currentScript = document.currentScript || Array.prototype.slice.call(document.getElementsByTagName('script')).find(function (s) {
return s.src.includes('woof.js');
Expand Down
64 changes: 63 additions & 1 deletion docs/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ button.highlight:hover {
background-color: #5A4097;
}

#Keyboard {
#Integrations {
background-color: #E04D4D
}

Expand Down Expand Up @@ -393,6 +393,68 @@ h4 {
border-radius: 10px;
}


#Weather{
background-color: #d5d4f0;
width:90% !important;
}
#Local{
background-color: #b9b8e6;
width:90% !important;
}
#Currency{
background-color: #9e9ddd;
width:90% !important;
}
#Sunrise{
background-color: #8381d4;
width:90% !important;
}
#Market{
background-color: #8381d4;
width:90% !important;
}
#Quotes{
background-color: #48487c;
width:90% !important;
}
#Chuck{
background-color: #48487c;
width:90% !important;
}
#Scientific{
background-color: #545390;
width:90% !important;
}
#Trivia{
background-color: #3e3d68;
width:90% !important;
}
#Firebase {
background-color: #282840;
width:90% !important;
}
#Custom{
background-color: #101019;
width:90% !important;
}

#Weather,
#Trivia,
#Scientific,
#Chuck,
#Quotes,
#Market,
#Currency,
#Custom,
#Sunrise,
#Local,
#Firebase {
height: 8%;
width: 33%;
border-radius: 10px;
}

#postimage {
background-color: #7775D3;
height: 10%;
Expand Down
Loading