title: Automatically select the highest quality via js？
body: <p>I want to write a js code to make the video quality on this website automatically select the highest quality.
  But I haven't learned js and I've found some relevant code to change it.</p>
  <p>For ex： <a href="https://www.acfun.cn/v/ac17342395" rel="nofollow noreferrer">https://www.acfun.cn/v/ac17342395</a> （for regular video） or <a href="https://live.acfun.cn/live/37662640" rel="nofollow noreferrer">https://live.acfun.cn/live/37662640</a> （in https://live.acfun.cn） （for live video）</p>
  <p>// @match              <em>://www.acfun.cn/v/</em>   （for regular video）
  // @match              <em>://live.acfun.cn/live/</em>   （for live video）</p>
  <pre><code> model.acfun = {
  
  elements: {
  
    selectList: {
      get: () =&gt; document.querySelector('.quality-panel&gt;li'),
      has: element =&gt; ('data-index=&quot;0&quot;').test(location.pathname) || element
    }
  
  },
  
  click: element =&gt; element.className == 'selected' ? element : element.click(),
  
  handler: model =&gt; ('data-index=&quot;0&quot;').test(location.pathname) ?
    setTimeout(() =&gt; model.click(model.elements.selectList.get()), 1000) :
    true
  </code></pre>
  <p>}</p>
  <p>Here is what is relevant on this video site.
  <a href="https://i.stack.imgur.com/1XcXK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1XcXK.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/dFcIJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dFcIJ.png" alt="enter image description here" /></a>
  I think I want to automatically select data-index=&quot;0&quot; （for regular video） and data-index=&quot;3&quot; （for live video） on it. Whatever, automatically select the highest.
  How do I change it?
  Thank you.</p>