Added the possibility to specify the id of the document element that the subtitles are appended to.#383
Added the possibility to specify the id of the document element that the subtitles are appended to.#383aldatsa wants to merge 4 commits intomozilla:masterfrom
Conversation
…the subtitles are appended to.
modules/parser/popcorn.parser.js
Outdated
There was a problem hiding this comment.
I like the idea, and I appreciate the patch :)
Only comment is what if we made target an options object, with keys and values.
Example:
pop.parseSRT( "my-video.srt", {
target: "my-div"
});
It works well for optional parameters because order doesn't matter. It also means in the future it is going to be easy to add other properties.
Also means custom parsers and plugins could use it for properties other than just target.
Thoughts?
|
No problem. Consistency is a good thing. |
There was a problem hiding this comment.
And do you mind moving these tabs to two spaces?
There was a problem hiding this comment.
If you don't mind I can do it when I merge this in.
|
I landed this just now. Doesn't seem to be closing the pull request because I did a rebase with current master. You can see the commit on master: 5835bbf I appreciate the contribution :) The next step is to add a test and write some docs :) I'm willing to do all that if you don't mind, but you're welcome to give it go. |
I think that this fixes the issue #382