native.js 749 B

123456789101112131415161718192021222324252627282930313233
  1. window["displayMenu"] = function() {
  2. document.getElementById(R.id.context).classList.add(R.klass.opened);
  3. };
  4. window["hideMenu"] = function() {
  5. document.getElementById(R.id.context).classList.remove(R.klass.opened);
  6. };
  7. window["toggleMenu"] = function() {
  8. _toggleMenu();
  9. };
  10. window["setChannelFavorite"] = function(chanId, val) {
  11. var channel = DATA.context.getChannel(chanId);
  12. if (channel) {
  13. if (val)
  14. starChannel(channel);
  15. else
  16. unstarChannel(channel);
  17. } else {
  18. console.error("Channel " +chanId +" not found");
  19. }
  20. };
  21. window["onApplicationPaused"] = function() {
  22. window.hasFocus = false;
  23. };
  24. window["onApplicationResumed"] = function() {
  25. window.hasFocus = true;
  26. };