anaclumos / bing-chat-for-all-browsers

Enable Bing ChatGPT on Chrome and Firefox
https://chrome.google.com/webstore/detail/bing-chat-for-all-browser/jofbglonpbndadajbafmmaklbfbkggpo
MIT License
1.49k stars 110 forks source link

increase maxlength of chat textarea #87

Closed alexanderadam closed 1 year ago

alexanderadam commented 1 year ago

see this Tweet for more information

antomanc commented 1 year ago

There is the need to inject js to change the textarea maxlenght, I can do it later.

antomanc commented 1 year ago

@alexanderadam I saw that this features is not something very related to this extension. But I made a tampermonkey script to set the maxLenght to 20k, just paste it to a tampermonkey script that executes on the bing chat url

` (function() { 'use strict'; window.addEventListener('load', function() { //call function to set max length until it returns true, at 500ms intervals, at most 20 times var timesExecuted = 0; var interval = setInterval(function(){ if (setMaxLenght() || timesExecuted > 20) { clearInterval(interval); } timesExecuted++; } , 500);

},false); })();

function setMaxLenght(){ try{ var firstElement = document.querySelector(".cib-serp-main").shadowRoot; var secondElement = firstElement.querySelector("#cib-action-bar-main").shadowRoot; var textArea = secondElement.querySelector("textarea"); textArea.maxLength = 20000; }catch(e){ return false; } if (textArea!=null){ return true; } return false; } `

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.