Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a 'debug' option that shows or hides debug traces to console #5

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

kontur
Copy link

@kontur kontur commented Jan 13, 2013

On certain string occurances the plugin would send traces to the console log. I added an optional 'debug' parameter which controls, if those console traces are displayed or not and set it to false by default.

Besides not wanting to show a plugin's own development/debug traces in projects I used the plugin in, I noticed that the plugin would happily fill the console with traces. If a tab was open that ran a page with the typer plugin and you'd return to that tab after browsing in another tab, there sometimes would come a slight delay/unresponsiveness caused by the console being filled with hundreds and thousands of traces.

Additionally, I made the file references in test.html relative.

@kontur
Copy link
Author

kontur commented May 13, 2013

Merge or disregard? Could you comment on the proposed change?

@kellysutton
Copy link
Contributor

Cool. Could you change index.html back? The // should be preferred.

@kontur
Copy link
Author

kontur commented May 14, 2013

Hey, thanks for the response. How come the src attributes starting with // or / are prefered? Both resources fail to load when testing locally, or am I missing something here?

Edit: I've read up on the protocol relative url for including the jquery form the cdn with // and I can change that. But the /src call does not neccesairly make sense - shouldn't it be relative to the file location, i.e. just src?

@kellysutton
Copy link
Contributor

The requests are likely failing because you're not serving the files up over a local HTTP server, but letting the operating system server them up. (On a Mac, it will use the OS X file: protocol.) The leading slash is just my style preference, and is a gentle reminder to test over HTTP.

@kontur
Copy link
Author

kontur commented May 14, 2013

I updated the jquery script src to be protocol neutral, but set the typer include relative. Even if you test via HTTP it is a special case where you have the typer src folder in the root of your server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants