Clickable Rows [Deleted]

@Jeremy P Alright, I changed the selector to this instead:
Code:
href = this.$rowItem.find('h3.title a:not(.prefixLink,.ReadToggle)').last()
    .attr('href');
Shouldn't hurt to extend the selector with 2 not expressions. And it seems to be working fine on threads with prefix, conversation list, and resource manager (with or without prefix).
 
Awesome, that works. I'll include your changes in (with credit). Feel free to send a PR, otherwise I'll do it manually.
 
Hi @Jeremy P

How easy is it to add custom clickable rows to this modification?

I have some <li> sections in a custom page I would like to make clickable.
 
Hi @Jeremy P

How easy is it to add custom clickable rows to this modification?

I have some <li> sections in a custom page I would like to make clickable.
Sorry for the late reply. Unfortunately it is a little difficult. It requires modifying the Javascript file and running it through Babel.

The process is as follows:
  1. Grab the full clickablerows.js file from the source code
  2. Attach the Jrahmy.ClickableRow object to your element by adding the following near the bottom of the file with the others:
    Code:
    XenForo.register('li.yourClass', 'Jrahmy.ClickableRow');
  3. Add a type for the element in the getType() function:
    Code:
    if (this.$rowItem.hasClass('yourClass')) {
      return 'YourType';
    }
  4. Add a href (link) getter to the bottom of the switch statement in the getHref() function:
    Code:
    case 'YourType':
      return this.$rowItem.find('a.yourLinkClass').first().attr('href');
  5. Run the modified file through Babel, you can probably use the online REPL with minify option: https://babeljs.io/repl/
  6. Save the resulting code and upload it to js/jrahmy/clickablerow.js in your XF installation (overwriting the old file)
 
Top Bottom