diff --git a/5_sep_maths_hw.md b/5_sep_maths_hw.md new file mode 100644 index 0000000..9365d33 --- /dev/null +++ b/5_sep_maths_hw.md @@ -0,0 +1,29 @@ +1. If the tangent at the point $(x_1, y_1)$ on the curve $y = x^3 + 3x^2 + 5$ passes through the origin, then $(x_1, y_1)$ does NOT lie on the curve : + * A. $x^2 + \frac{y^2}{81} = 2$ + * B. $\frac{y^2}{9} - x^2 = 8$ + * C. $y = 4x^2 + 5$ + * D. $\frac{x}{3} - y^2 = 2$ + +2. For the function $f(x) = 4\log_e(x - 1) - 2x^2 + 4x + 5$, $x > 1$, which one of the following is NOT correct? + * A. f is increasing in $(1, 2)$ and decreasing in $(2, \infty)$ + * B. $f(x) = -1$ has exactly two solutions + * C. $f'(e) - f''(2) < 0$ + * D. $f(x) = 0$ has a root in the interval $(e, e + 1)$ + +3. If the angle made by the tangent at the point $(x_0, y_0)$ on the curve $x = 12(t + \sin t \cos t)$, $y = 12(1 + \sin t)^2$, $0 < t < \frac{\pi}{2}$, with the positive x-axis is $\frac{\pi}{3}$, then $y_0$ is equal to: + * A. $6(3 + 2\sqrt{2})$ + * B. $3(7 + 4\sqrt{3})$ + * C. 27 + * D. 48 + +4. Let $f(x) = 2\cos^{-1}x + 4\cot^{-1}x - 3x^2 - 2x + 10, x \in [-1, 1]$. If $[a, b]$ is the range of the function f, then $4a - b$ is equal to : + * A. 11 + * B. $11 - \pi$ + * C. $11 + \pi$ + * D. $15 - \pi$ + +5. If the maximum value of $a$, for which the function $f_a(x) = \tan^{-1}2x - 3ax + 7$ is non-decreasing in $(-\frac{\pi}{6}, \frac{\pi}{6})$, is $\bar{a}$, then $f_{\bar{a}}(\frac{\pi}{8})$ is equal to : + * A. $8 - \frac{9\pi}{4(9+\pi^2)}$ + * B. $8 - \frac{4\pi}{9(4+\pi^2)}$ + * C. $8\left(\frac{1+\pi^2}{9+\pi^2}\right)$ + * D. $8 - \frac{\pi}{4}$ \ No newline at end of file diff --git a/js/client-modules/list-item-controller.js b/js/client-modules/list-item-controller.js index 5899cc5..bd302ac 100644 --- a/js/client-modules/list-item-controller.js +++ b/js/client-modules/list-item-controller.js @@ -175,16 +175,9 @@ class ListItemController { async copyListContent(element) { try { - const listIndex = parseInt(element.dataset.listIndex, 10); - const listData = window.__APP_DATA__.listItems; - const isValidIndex = !isNaN(listIndex) && listData && listIndex < listData.length && listData[listIndex]; - - if (!isValidIndex) { - await this.copyElementText(element); - return; - } - - const textToCopy = listData[listIndex].content; + // Copy the full visible text of the list item, including any nested options/sub-lists + const textToCopy = (element.innerText || element.textContent || '').trim(); + if (!textToCopy) throw new Error('List item content is empty.'); await this._copyToClipboard(textToCopy); this.showNotification('List content copied!'); } catch (err) { diff --git a/js/rendered-page-builder.js b/js/rendered-page-builder.js index d37a4b7..a6c7c85 100644 --- a/js/rendered-page-builder.js +++ b/js/rendered-page-builder.js @@ -1147,16 +1147,9 @@ class ListItemController { async copyListContent(element) { try { - const listIndex = parseInt(element.dataset.listIndex, 10); - const listData = window.__APP_DATA__.listItems; - const isValidIndex = !isNaN(listIndex) && listData && listIndex < listData.length && listData[listIndex]; - - if (!isValidIndex) { - await this.copyElementText(element); - return; - } - - const textToCopy = listData[listIndex].content; + // Copy the full visible text of the list item, including any nested options/sub-lists + const textToCopy = (element.innerText || element.textContent || '').trim(); + if (!textToCopy) throw new Error('List item content is empty.'); await this._copyToClipboard(textToCopy); this.showNotification('List content copied!'); } catch (err) {