on Sat 04 Jun 2016, 07:17 by Guest
Good try, {@=590}Hitsu{/@}! I've changed the topic title for you and made it Tutorial {#}12{/#}.
I agree, to make things look a little less complicated and inviting to keep people posting ideas for the API, you should make the code more readable. Apart from that, I think it's a good first start. Keep it up!
I agree, to make things look a little less complicated and inviting to keep people posting ideas for the API, you should make the code more readable. Apart from that, I think it's a good first start. Keep it up!
- Code:
var $fm = {
version: 1.3,
use: !0,
author: "Hitsu",
cookie: {
cook: function(e, o, n) {
my_setcookie(e, o, n)
},
take: function(e) {
return my_getcookie(e)
},
eat: function(e) {
document.cookie = e + "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;", console.log("Yummy cookies!")
}
},
forumData: {
username: _userdata.username,
guest: function() {
return _userdata.session_logged_in ? !1 : !0
},
member: function() {
return _userdata.session_logged_in ? !0 : !1
},
memberAvatar: _userdata.avatar,
isTopic: function() {
return window.location.href.indexOf("t") > -1 ? !0 : !1
},
utilities: {
log: function(e, o) {
arguments[1].value > 0 ? console.log(e, NaN + o) : console.log(e)
}
}
}
};
if ($fm.use === !1) var $fm = !1;
if ($fm.version < 1.3) {
var $fm = !1;
console.log("Please update to 1.3 first.")
}
"Hitsu" != $fm.author && (document.innerHTML = "The original author of fmAPI was Hitsu. Don't steal from her.");