Changes to ratemyfocus.breckyunits.com

ffff:72.234.190.31
ffff:72.234.190.31
2 months ago
Updated basic.html
basic.html
Changed around line 357
- window.location = "https://buy.stripe.com/9AQ3fYgzfgHbguY5kP";
+ window.location = "https://buy.stripe.com/bIYdUC1El4Yt1A45kQ";
ffff:72.234.190.31
ffff:72.234.190.31
2 months ago
Updated basic.html
basic.html
Changed around line 7
-
Changed around line 94
+ .loading {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(255, 255, 255, 0.8);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ z-index: 1000;
+ }
Changed around line 130
-
- Calculate FocusRating (Basic)
-
+
Changed around line 145
- let embeddings = [];
- let projectedPoints = [];
Changed around line 174
- // Automatically trigger analysis
- calculateFocusArea();
- // Rest of the JavaScript remains the same
Changed around line 224
- function analyzeText() {
- const text = document.getElementById("textInput").value;
- embeddings = basicEmbedding(text);
- projectedPoints = simplePCA(embeddings);
- updateVisualization();
- }
-
- function analyzeTextPro() {
- window.location = "https://buy.stripe.com/9AQ3fYgzfgHbguY5kP";
- }
-
- function updateVisualization() {
+ function updateVisualization(
+ projectedPoints,
+ messages,
+ focusEmbedding = null,
+ ) {
- chart = new Chart(ctx, {
- type: "scatter",
- data: {
- datasets: [
+ const datasets = [
+ {
+ label: "Thoughts",
+ data: projectedPoints.map((point, index) => ({
+ x: point[0],
+ y: point[1],
+ message: messages[index],
+ })),
+ backgroundColor: "rgba(0, 102, 204, 0.5)",
+ },
+ ];
+
+ // Add focus point if provided
+ if (focusEmbedding) {
+ datasets.push({
+ label: "Target",
+ data: [
- label: "Thought Embeddings",
- data: projectedPoints.map((point) => ({
- x: point[0],
- y: point[1],
- })),
- backgroundColor: "rgba(0, 102, 204, 0.5)",
+ x: focusEmbedding[0],
+ y: focusEmbedding[1],
+ message: document.getElementById("focusThought").value,
- },
+ backgroundColor: "rgba(255, 0, 0, 0.8)",
+ pointRadius: 8,
+ });
+ }
+
+ chart = new Chart(ctx, {
+ type: "scatter",
+ data: { datasets },
Changed around line 275
+ plugins: {
+ tooltip: {
+ callbacks: {
+ label: function (context) {
+ return context.raw.message;
+ },
+ },
+ },
+ legend: {
+ display: true,
+ },
+ },
- function calculateFocusArea() {
- const focusThought = document
- .getElementById("focusThought")
- .value.toLowerCase();
- const text = document.getElementById("textInput").value;
- const lines = text
- .toLowerCase()
- .split(/\n+/)
- .filter((w) => w.length > 0);
+ function showLoading() {
+ const loadingDiv = document.createElement("div");
+ loadingDiv.className = "loading";
+ loadingDiv.id = "loadingIndicator";
+
+ const spinnerHTML = `
+
+
+ border-top: 4px solid #0066cc;
+ border-radius: 50%;
+ width: 40px;
+ height: 40px;
+ animation: spin 1s linear infinite;
+ margin: 0 auto;
+ margin-bottom: 10px;">
+
+
Analyzing...
+
+ `;
- const totalLines = lines.length;
- const hits = lines.filter((line) => line.includes(focusThought)).length;
- const focusRating = (100 * hits) / totalLines;
+ loadingDiv.innerHTML = spinnerHTML;
+ document.body.appendChild(loadingDiv);
+ }
- document.getElementById("results").innerHTML = `
-

RateMyFocus Results

-

Total Thoughts: ${totalLines}

-

FocusRating for ${focusThought}: ${focusRating.toFixed(0)}% ๐Ÿ”

- `;
+ function hideLoading() {
+ const loadingDiv = document.getElementById("loadingIndicator");
+ if (loadingDiv) {
+ loadingDiv.remove();
+ }
+
+ function analyzeText() {
+ showLoading();
+
+ setTimeout(() => {
+ const text = document.getElementById("textInput").value;
+ const focusThought = document.getElementById("focusThought").value;
+ const lines = text.split(/\n+/).filter((line) => line.length > 0);
+
+ const totalLines = lines.length;
+ const hits = lines.filter((line) =>
+ line.toLowerCase().includes(focusThought.toLowerCase()),
+ ).length;
+
+ const focusRating = (100 * hits) / totalLines;
+
+ const embeddings = basicEmbedding(text);
+ const focusEmbedding = basicEmbedding(focusThought)[0];
+ const projectedPoints = simplePCA(embeddings);
+
+ const focusProjected = simplePCA([focusEmbedding])[0];
+
+ updateVisualization(projectedPoints, lines, focusProjected);
+
+ document.getElementById("results").innerHTML = `
+

RateMyFocus Results

+

Total Thoughts: ${totalLines}

+

FocusRating for ${focusThought}: ${focusRating.toFixed(1)}% ๐Ÿ”

+

Using basic word matching

+ `;
+
+ hideLoading();
+ }, 100); // Small delay to ensure loading indicator shows even for quick operations
+ }
+
+ async function analyzeTextPro() {
+ window.location = "https://buy.stripe.com/9AQ3fYgzfgHbguY5kP";
+ }
+
+ // Add the spin animation to the existing style section
+ const styleSheet = document.styleSheets[0];
+ styleSheet.insertRule(
+ `
+ @keyframes spin {
+ 0% { transform: rotate(0deg); }
+ 100% { transform: rotate(360deg); }
+ }
+ `,
+ styleSheet.cssRules.length,
+ );
ffff:72.234.190.31
ffff:72.234.190.31
2 months ago
Updated basic.html
basic.html
Changed around line 113
- own line. Emails, tweets, texts, etc, to calculate your RateMyFocus.
+ own line. Emails, tweets, texts, etc, to calculate your FocusRating.
- Calculate RateMyFocus (Basic)
+ Calculate FocusRating (Basic)
- Calculate RateMyFocus (Pro)
+ Calculate FocusRating (Pro)
ffff:72.234.190.31
ffff:72.234.190.31
2 months ago
Updated basic.html
basic.html
Changed around line 4
- content="https://thoughtfocus.breckyunits.com/og.png"
+ content="https://ratemyfocus.breckyunits.com/og.png"
- ThoughtFocus - Measure Your Focus By Your Words
+ RateMyFocus - Measure The Focus Of Your Published Thoughts
Changed around line 99
-

ThoughtFocus ยท Measure Your Focus by Your Words ยท TF = FT/T

+

+ RateMyFocus ยท Measure The Focus of Your Published Thoughts ยท FR = FT/T
+
Changed around line 112
- Paste everything you wrote today, each message or document on its own
- line. Emails, tweets, texts, etc, to calculate your ThoughtFocus.
+ Paste everything you published today, each message or document on its
+ own line. Emails, tweets, texts, etc, to calculate your RateMyFocus.
- Calculate ThoughtFocus (Basic)
+ Calculate RateMyFocus (Basic)
- Calculate ThoughtFocus (Pro)
+ Calculate RateMyFocus (Pro)
Changed around line 277
- const focusScore = (100 * hits) / totalLines;
+ const focusRating = (100 * hits) / totalLines;
-

ThoughtFocus Results

+

RateMyFocus Results

-

ThoughtFocus for ${focusThought}: ${focusScore.toFixed(0)}% ๐Ÿ”

+

FocusRating for ${focusThought}: ${focusRating.toFixed(0)}% ๐Ÿ”

ffff:24.165.26.201
ffff:24.165.26.201
2 months ago
Updated basic.html
basic.html
Changed around line 23
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
ffff:24.165.26.201
ffff:24.165.26.201
2 months ago
Updated basic.html
basic.html
Changed around line 23
- opacity: 0.5;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
ffff:24.165.26.201
ffff:24.165.26.201
2 months ago
Updated basic.html
basic.html
Changed around line 23
- opacity: 0.9;
+ opacity: 0.5;
ffff:24.165.26.201
ffff:24.165.26.201
2 months ago
Updated basic.html
basic.html
Changed around line 24
+ background: gold;
ffff:24.165.26.201
ffff:24.165.26.201
2 months ago
Updated basic.html
basic.html
Changed around line 22
+ .pro-button:hover {
+ opacity: 0.9;
+ color: black;
+ }
ffff:24.165.26.201
ffff:24.165.26.201
2 months ago
Updated basic.html
basic.html
Changed around line 20
+ color: black;