mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
Remove all global dependencies from broadcast modules.
This commit is contained in:
parent
cd86ef5600
commit
d934fd6107
4 changed files with 17 additions and 10 deletions
|
@ -19,10 +19,12 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var global = this;
|
||||
|
||||
function loadBroadcastSliderJS()
|
||||
// These parameters were global, now they are injected. A reference to the
|
||||
// Timeslider controller would probably be more appropriate.
|
||||
function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||
{
|
||||
var BroadcastSlider;
|
||||
|
||||
(function()
|
||||
{ // wrap this code in its own namespace
|
||||
|
@ -203,7 +205,7 @@ function loadBroadcastSliderJS()
|
|||
}
|
||||
}
|
||||
|
||||
global.BroadcastSlider = {
|
||||
BroadcastSlider = {
|
||||
onSlider: onSlider,
|
||||
getSliderPosition: getSliderPosition,
|
||||
setSliderPosition: setSliderPosition,
|
||||
|
@ -495,6 +497,8 @@ function loadBroadcastSliderJS()
|
|||
{
|
||||
$("#viewlatest").html(loc == BroadcastSlider.getSliderLength() ? "Viewing latest content" : "View latest content");
|
||||
})
|
||||
|
||||
return BroadcastSlider;
|
||||
}
|
||||
|
||||
exports.loadBroadcastSliderJS = loadBroadcastSliderJS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue