vedmack/feedback_me

Custom variable name

Closed this issue · 6 comments

Hi,

I'm just starting with your plugin so I can't really make a feedback now, but for what I've saw, it would be nice to be able to choose our own variable name and not the mandatory "fm".

Some might already have that somewhere or just want to name it properly regarding their naming convention.

Thanks !

Hi, and welcome aboard, the "fm" is the name of the module of the feedback_me plugin, its hard-coded , take a look at this line: var fm = (function () { , till now one have complained about collision with other plugin, and anyway its really easy to change it into something else , all you have to do is the replace all occurrences of the fm. in the jquery.feedback_me.js file with some other name (like feedback_me.) and of course replace the "fm" in the following line "var fm = (function () {" too. Anyway if in the future enough users will complain about collision with other plugin I will consider changing it, about making it dynamic, I don't know about such way and don't think that it will be a good idea.

Yes I know we can change the variable name inside the js file, but usually your don't want to make any change to the plug in files as they can be modified by futher updates and therefore override your previous changes.

That's why I would recommend a flexible variable name.

You are right about changing other plugin is a not a good idea, but frankly I never seen that plugin allows you to control its name. So as long as its not doing any conflicts with other plugin I will keep it short and simple "fm" :)

Actually it's doing conflict with JQuery, the whole library ins't working when I init feedback_me. The thing is that it's happening only in IE (7, 8, 9).

SCRIPT16389: Unspecified error.
jquery-1.10.2.min_1.js, Line 5 Character 19989

I'm gonna try to rename the fm variable to see if it changes anything. Did you encountered something like this ?

Ok , found the problem, was comparing jquery version in order to find out if I should use "on" or "delegate" the thing is that 1.7 > 1.10.2 while the version of the 1.10.2 is actually a more recent one so the check was wrong... it has nothing to do with the fm name of the plugin... fixing...

Cool !