מדיה ויקי:Gadget-HotCat.js: הבדלים בין גרסאות בדף

CTRL-Click on remove-link or on OK-button, or CTRL-dblclick in list prevent autocommit
Fix for intereference with Lupin's popups: don't store category name in title attribute of remove link; instead read it directly from the DOM in hotcat_remove.
שורה 186: שורה 186:
   // is bypassed.
   // is bypassed.
   remove_link.href = "#catlinks";
   remove_link.href = "#catlinks";
  remove_link.title = cat_title;
   remove_link.onclick = hotcat_remove;
   remove_link.onclick = hotcat_remove;
   remove_link.appendChild ( a1 ) ;
   remove_link.appendChild ( a1 ) ;
שורה 256: שורה 255:
   var node = hotcat_evt2node (evt);
   var node = hotcat_evt2node (evt);
   if (!node) return false;
   if (!node) return false;
   var cat_title = encodeURIComponent (node.getAttribute ('title'));
  // Get the category name from the original link to the category, which is at
  // node.parentNode.firstChild (the DOM structure here is
  // <span><a...>Category</a>|<a...>(-)</a>...</span>).
   var cat_title = encodeURIComponent (node.parentNode.firstChild.innerHTML);  
   if ( hotcat_upload ) {
   if ( hotcat_upload ) {
     hotcat_remove_upload ( cat_title ) ;
     hotcat_remove_upload ( cat_title ) ;