Forumotion might have useful things for developers. They have jQuery already in install, special things such as [ic]my_setcookie[/ic], and the [ic]_userdata[/ic] object. Why wouldn't we add a few of little addons in FM, so we can customize it freely as we like? [ic]fmAddon[/ic] would do things for you. This code might check for post IDs, storing [ic]_userdata[/ic] object in [ic]localStorage[/ic], and a few more addons.
For v.0.1, I'll only added post IDs. Maybe tomorrow I'll update the code. I'll just build a wrapper function for this, tomorrow I'll update it with selectors and JOL (JavaScript Object Literal). Don't bother the [ic]imported[/ic] part, it's just for checking imported file so it would prevent double script in the directory.
For v.0.1, I'll only added post IDs. Maybe tomorrow I'll update the code. I'll just build a wrapper function for this, tomorrow I'll update it with selectors and JOL (JavaScript Object Literal). Don't bother the [ic]imported[/ic] part, it's just for checking imported file so it would prevent double script in the directory.
- Code:
var imported = [];
if(imported[0] != 'fmAddon' || imported.length === 0) {
imported.push('fmAddon');
}
/* start script */
/* script coming soon */