You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Fallback: Append to end if article is very short
26
-
else{
27
-
prose.appendChild(adContent);
60
+
61
+
// Fallback: Paragraphs (only if no ads inserted yet)
62
+
// The user said "also insert...". This implies the header rules function together.
63
+
// The paragraph rule is a fallback if "no heading tag is there" (from previous prompt).
64
+
// So if we inserted ANY ad in headers, we skip paragraphs.
65
+
if(!primaryAdUsed){
66
+
constparagraphs=prose.querySelectorAll('p');
67
+
68
+
// Insert after 3rd paragraph
69
+
if(paragraphs.length>=3){
70
+
// Previous prompt said "after above 3rd paragraph" -> interpreted as after 3rd.
71
+
// Wait, "after above 3rd paragraph" is ambiguous. "insert after above 3rd paragraph" -> maybe "insert after the paragraph that is above the 3rd one" (i.e. 2nd)?
72
+
// Or "insert above 3rd paragraph" (before 3rd)?
73
+
// Code in Step 153 used `afterend` on paragraphs[2] (after 3rd).
74
+
// Let's stick to "After 3rd paragraph" as a reasonable default unless clarified.
75
+
// Actually, let's use 'beforebegin' on the 3rd to match the "above" sentiment of header rule?
76
+
// "if no heading tag is there then insert after above 3rd paragraph"
77
+
// "after above 3rd paragraph" -> literally could mean "after the 3rd paragraph".
78
+
// Let's stick to paragraphs[2].afterend (after 3rd).
0 commit comments