95516.js 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. (function() {
  2. var headerElem = document.querySelector(".header");
  3. if (headerElem) {
  4. var backElem = document.getElementById("back-95516");
  5. if (backElem) {
  6. return;
  7. }
  8. var css = ".header{position:relative;}#back-95516 {z-index:2000;position: absolute;display: inline-block;color: #333;top: 0;left: 0;width: 44px;height: 44px;}#back-95516:before{border: #fff solid 3px;position: absolute;left: 15px;top: 15px;display: block;content: ' ';background-size: 12px, auto;width: 12px;height: 12px;border-top: none;border-right: none;-webkit-transform: rotate(45deg);transform: rotate(45deg);}";
  9. var headElem = document.head || document.getElementsByTagName('head')[0];
  10. var styleElem = document.createElement('style');
  11. styleElem.type = 'text/css';
  12. if (styleElem.styleSheet) {
  13. styleElem.styleSheet.cssText = css;
  14. } else {
  15. styleElem.appendChild(document.createTextNode(css));
  16. }
  17. headElem.appendChild(styleElem);
  18. backElem = document.createElement('a');
  19. backElem.id = 'back-95516';
  20. headerElem.appendChild(backElem);
  21. backElem.addEventListener('click', function(e) {
  22. plus.webview.currentWebview().close('auto');
  23. }, true);
  24. document.addEventListener('plusready', function() {
  25. plus.key.addEventListener('backbutton', function() {
  26. plus.webview.currentWebview().close('auto');
  27. })
  28. });
  29. }
  30. })();