Amboss Copier

Copy article informations from Miamed Amboss.

当前为 2016-09-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Amboss Copier
  3. // @namespace http://oix.cc/gm
  4. // @description Copy article informations from Miamed Amboss.
  5. // @author Bin Zhang
  6. // @icon https://amboss.miamed.de/favicon-192x192.png
  7. // @homepageURL http://oix.cc/amboss
  8. // @version 0.0.1
  9. // @match https://amboss.miamed.de/library
  10. // @include /^https?://amboss-miamed-de\.ezproxy\..*/library$/
  11. // @run-at document-idle
  12. // ==/UserScript==
  13.  
  14. (function(){
  15.  
  16. if (typeof angular !== 'undefined' || typeof angular.element('#LibraryContent').scope() !== 'undefined') {
  17. var initWatcher = setInterval(function () {
  18. console.log('watch');
  19. // loaded
  20. if (angular.element('#LibraryContent').scope().$root !== true) {
  21. //console.log($('#LibraryContent').find('article.LearningCard[data-xid]').first().attr('data-xid'))
  22. clearInterval(initWatcher);
  23. init();
  24. }
  25. /*if ($('#LibraryContent').find('article.LearningCard').length > 0) {
  26. //console.log($('#LibraryContent').find('article.LearningCard[data-xid]').first().attr('data-xid'))
  27. clearInterval(initWatcher);
  28. init();
  29. }*/
  30. }, 5);
  31.  
  32. angular.element('#LearningCard').ready(function () {
  33. console.log('cardready', angular);
  34. });
  35. }
  36.  
  37. function init() {
  38. console.log('init');
  39. }
  40.  
  41. }());