// ==UserScript==
// @name Soylent Upgrade
// @match http://soylentnews.org/submit.pl
// @match https://soylentnews.org/submit.pl
// @match http://soylentnews.org/submit.pl?op=viewsub&subid=*
// @match https://soylentnews.org/submit.pl?op=viewsub&subid=*
// @match http://soylentnews.org/admin.pl
// @match https://soylentnews.org/admin.pl
// @match http://soylentnews.org/admin.pl?op=edit&sid=*
// @match https://soylentnews.org/admin.pl?op=edit&sid=*
// @match http://soylentnews.org/comments.pl*
// @match https://soylentnews.org/comments.pl*
// ==/UserScript==var simplifyChars = true;
var boxes = document.getElementsByTagName("textarea");
for (var x=0; x<boxes.length; x++)
{
if (boxes[x].name == "introtext" || boxes[x].name == "bodytext" || boxes[x].name == "story")
{
var temp = boxes[x].value;
temp = temp.replace(/<\/p><p>/g,"<\/p>\n\n<p>");
temp = temp.replace(/<br>\s?<br>/g,"<\/p>\n\n<p>");
temp = temp.replace(/<\/blockquote><p>/g,"<\/blockquote>\n\n<p>");
temp = temp.replace(/<\/p><blockquote>/g,"<\/p>\n\n<blockquote>");
temp = temp.replace(/<blockquote><div><p>/g,"<blockquote><div>\n\n<p>");
temp = temp.replace(/<\/p><\/div><\/blockquote>/g,"<\/p>\n\n<\/div><\/blockquote>");
temp = temp.replace(/<\/blockquote><blockquote>/g,"<\/blockquote>\n\n<blockquote>");
temp = temp.replace(/<p class="byline">\s/i,"<p class=\"byline\">");
temp = temp.replace(/<p>\s/g,"<p>");
temp = temp.replace(/\s<\/p>/g,"<\/p>");
temp = temp.replace(/<\/li><li>/g,"<\/li>\n<li>");
temp = temp.replace(/<\/li><\/ul>/g,"<\/li>\n<\/ul>");
temp = temp.replace(/<\/p><ul>/g,"<\/p>\n\n<ul>");
temp = temp.replace(/<p>\[...\]/g,"<p>[...] ");
while (temp.indexOf(" ")!=-1)
{
temp = temp.replace(/ /g," ");
}
if (simplifyChars)
{
temp = temp.replace(/\u2018/g,"'");
temp = temp.replace(/\u2019/g,"'");
temp = temp.replace(/\u201C/g,"\"");
temp = temp.replace(/\u201D/g,"\"");
temp = temp.replace(/\u2026/g,"..."); // ellipsis
}
boxes[x].value = temp;
boxes[x].rows = 32;
}
var toolbar = document.createElement("div");
// Blockquote button
var tempbutton = document.createElement("input");
tempbutton.setAttribute("type","button");
tempbutton.setAttribute("value","Blockquote");
tempbutton.setAttribute("onmousedown","addBlockquote(document.getElementsByTagName('textarea')["+x+"]);");
toolbar.appendChild(tempbutton);
// Bold button
var tempbutton = document.createElement("input");
tempbutton.setAttribute("type","button");
tempbutton.setAttribute("value","B");
tempbutton.setAttribute("style","font-weight:bold;");
tempbutton.setAttribute("onmousedown","addBold(document.getElementsByTagName('textarea')["+x+"]);");
toolbar.appendChild(tempbutton);
// Italic button
var tempbutton = document.createElement("input");
tempbutton.setAttribute("type","button");
tempbutton.setAttribute("value","I");
tempbutton.setAttribute("style","font-style:italic;");
tempbutton.setAttribute("onmousedown","addItalic(document.getElementsByTagName('textarea')["+x+"]);");
toolbar.appendChild(tempbutton);
// Strike button
var tempbutton = document.createElement("input");
tempbutton.setAttribute("type","button");
tempbutton.setAttribute("value","S");
tempbutton.setAttribute("style","text-decoration:line-through;");
tempbutton.setAttribute("onmousedown","addStrike(document.getElementsByTagName('textarea')["+x+"]);");
toolbar.appendChild(tempbutton);
boxes[x].parentNode.insertBefore(toolbar, boxes[x].nextSibling);
}var temp = document.createElement("script");
temp.appendChild(document.createTextNode("function addBlockquote(area) { var sel = getSelection(); if (sel.length != 0) { area.value = area.value.replace(sel,'<blockquote>'+sel+'<\/blockquote>'); } } function addBold(area) { var sel = getSelection(); if (sel.length != 0) { area.value = area.value.replace(sel,'<b>'+sel+'<\/b>'); } } function addItalic(area) { var sel = getSelection(); if (sel.length != 0) { area.value = area.value.replace(sel,'<em>'+sel+'<\/em>'); } } function addStrike(area) { var sel = getSelection(); if (sel.length != 0) { area.value = area.value.replace(sel,'<strike>'+sel+'<\/strike>'); } }"));
document.getElementsByTagName('head')[0].appendChild(temp);function getSelection() {
return (!!document.getSelection) ? document.getSelection() :
(!!window.getSelection) ? window.getSelection() :
document.selection.createRange().text;
}
There are an awful lot of pages on my web site, and I've been busy making them all "mobile-friendly". Most of them are little or no problem making them look good on all platforms, but there are three that are especially problematic.
I jumped this hurdle (well, sort of stumbled past it) by making two of each of the pages with a link to the mobile page from the index.
Ideally, I could just check to see if it was a phone or not and redirect phones to the mobile page, but there's no way to make this 100% successful*. Each brand of phone has a different user agent, there are a lot of installable phone browsers. On top of that, is it an Android phone or an Android tablet? With the minimum typeface size and viewport set, those pages are fine on the PC version but the phone version looks like crap.
Apple should have thought of this when they made the first iPhone, and Google should have thought of this when developing Android. The answer is simple, but it can only be implimented by browser makers and perhaps the W3C.
From the beginning of the World Wide Web, browsers looked for index.html, the default front page in any directory. This worked fine before smart phones, but no longer.
Phone browsers should look first for mobile.html, and if it exists display that, and display index.html if it isn't there. Tablets and computers would behave as they always have.
It doesn't have to be mobile.html, it could be any name as long as everyone agreed that it was the standard, like they did with index.html.
Maintaining a web site would be much easier if they did this. What do you guys think?
* A fellow Soylent tipped me to the Apache Mobile Filter. It looks promising, especially since my host uses Apache. I'm looking into it.
I've recently come into possession of a Wang 720A/B Reference manual. My late uncle owned the Wang and hadn't been able to find a manual anywhere. Turns out, it was at my Grandmother's house. I was a bit suspicious because Grandpa had been dead for more than a decade, but I didn't ask any questions.
I don't understand why a Wang would need a reference manual in the first place, (even your mother can use one with little to no training or instruction) but here I am looking at one.
Does anyone have any suggestions on discussion groups / websites that might be interested in seeing pictures of my Wang (Reference Manual). Although demand for my Wang (Reference Manual) is at record low levels, I suspect a niche group somewhere has been itching for this.
Maybe the sad reality is that nobody cares about my Wang (reference manual). Sometimes it can feel that way.
// ==UserScript==
// @name Soylent Upgrade
// @match http://soylentnews.org/submit.pl
// @match https://soylentnews.org/submit.pl
// @match http://soylentnews.org/submit.pl?op=viewsub&subid=*
// @match https://soylentnews.org/submit.pl?op=viewsub&subid=*
// @match http://soylentnews.org/admin.pl
// @match https://soylentnews.org/admin.pl
// @match http://soylentnews.org/admin.pl?op=edit&sid=*
// @match https://soylentnews.org/admin.pl?op=edit&sid=*
// @match http://soylentnews.org/comments.pl*
// ==/UserScript==var simplifyChars = true;
var boxes = document.getElementsByTagName("textarea");
for (var x=0; x<boxes.length; x++)
{
if (boxes[x].name == "introtext" || boxes[x].name == "bodytext")
{
var temp = boxes[x].value;
temp = temp.replace(/<\/p><p>/g,"<\/p>\n\n<p>");
temp = temp.replace(/<br>\s?<br>/g,"<\/p>\n\n<p>");
temp = temp.replace(/<\/blockquote><p>/g,"<\/blockquote>\n\n<p>");
temp = temp.replace(/<\/p><blockquote>/g,"<\/p>\n\n<blockquote>");
temp = temp.replace(/<blockquote><div><p>/g,"<blockquote><div>\n\n<p>");
temp = temp.replace(/<\/p><\/div><\/blockquote>/g,"<\/p>\n\n<\/div><\/blockquote>");
temp = temp.replace(/<\/blockquote><blockquote>/g,"<\/blockquote>\n\n<blockquote>");
temp = temp.replace(/<p class="byline">\s/i,"<p class=\"byline\">");
temp = temp.replace(/<p>\s/g,"<p>");
temp = temp.replace(/\s<\/p>/g,"<\/p>");
temp = temp.replace(/<\/li><li>/g,"<\/li>\n<li>");
temp = temp.replace(/<\/li><\/ul>/g,"<\/li>\n<\/ul>");
temp = temp.replace(/<\/p><ul>/g,"<\/p>\n\n<ul>");
temp = temp.replace(/ /g," ");
if (simplifyChars)
{
temp = temp.replace(/\u2018/g,"'");
temp = temp.replace(/\u2019/g,"'");
temp = temp.replace(/\u201C/g,"\"");
temp = temp.replace(/\u201D/g,"\"");
temp = temp.replace(/\u2026/g,"..."); // ellipsis
}
boxes[x].value = temp;
boxes[x].rows = 32;
}
var toolbar = document.createElement("div");
var tempbutton = document.createElement("input");
tempbutton.setAttribute("type","button");
tempbutton.setAttribute("value","Blockquote");
tempbutton.setAttribute("onmousedown","addBlockquote(document.getElementsByTagName('textarea')["+x+"]);");
toolbar.appendChild(tempbutton);
boxes[x].parentNode.insertBefore(toolbar, boxes[x].nextSibling);
}var temp = document.createElement("script");
temp.appendChild(document.createTextNode("function addBlockquote(area) { var sel = getSelection(); if (sel.length != 0) { area.value = area.value.replace(sel,'<blockquote>'+sel+'<\/blockquote>'); } }"));
document.getElementsByTagName('head')[0].appendChild(temp);function getSelection() {
return (!!document.getSelection) ? document.getSelection() :
(!!window.getSelection) ? window.getSelection() :
document.selection.createRange().text;
}
Yooman rights? Yooman rights! I don't need no yooman rights! I ain't foreign and I ain't done nuffink wrong.
Michael "Teachers are the Enemies of Promise" Gove is going to give us a nice British Bill of Rights instead. They did promise to stop their supporters voting for Nigel and the bigots. Nigel didn't resign after all.
And Gove is going to be working with Theresa May, who will be pushing through the Snoopers Charter.
And the kickings are about to begin.
Subaru's marketing includes their "Live. Love." ads, presenting the cars as engineered to save your loved ones if they're in an accident.
But my 02 Subaru Outback tells a different love story. My Dad left it to me a little over 5 years ago when he passed away. At the time it had 96k miles. Since then I've put an additional 135k miles on it w/ just routine maintenance.
Vehicles are inspected annually where I live, and the Subaru was looking pretty ragged. It needed everything chassis-wise, and had a bad oil leak. There was no way it was going to pass this year w/o a major investment of time and money. It still runs good so I decided to go ahead and fix it, and over the past week I've changed everything underneath, plus fixed the oil leak and changed the timing belt/water pump.
By Thursday night I was about half-way done. While having dinner w/ a friend I said, "My Dad is probably smiling, knowing I'm keeping the Subaru rolling." My friend replied, "He's probably shaking his head, wondering why you don't buy a new car."
My Dad was a coin collector, and he always pulled bicentennial quarters out of circulation and kept them. I also started keeping them and after a while I'd give him what I had. He left his collection to my sister so now I give them to her. Bicentennial quarters are a lot harder to find these days; I usually spot one about once or twice a year.
Friday morning, less than 12 hours after my friend suggested I junk the Subaru, I got a bicentennial quarter in change on an impulse buy at a local gardening store.
My friend was wrong. Thanks Dad, I miss you.
I've been staying in a motel the last week, because we had an arrangement where an apartment would become available on the 15th. That has fallen through and I don't have anywhere to go. I can't afford another week at this extended stay motel. I have $300 in my checking account. The motel takes $350 a week for me, my 67 year old mother, and two cats.
The fault is partly ours, and partly the wishy-washy landlord.
She guaranteed us the previous tenants would move out since they had given notice, and they did not. My mother is the one who decided to take this arrangement despite my concerns, god bless her, but now it seems my fears were accurate. The next place needs to be in my name I think.
I'm in Mesa Arizona.
Can anyone hear my quiet gurgling for help?
My email is thinkingrodent@gmail.com if anyone wants to help me financially. That's what my paypal is linked to.
Squeak.
Edit: Thank you to NORCOM and Krishna. You've given me a huge help. I am the author of the Epoch Init System, something I didn't mention before, so perhaps your kindness will allow me the stability to improve Epoch.
Here in Blighty, we're having a General Election on Thursday 7th May.
This time around, the Official Monster Raving Loony Party has conceded that it will probably lose votes to UKIP.
Oh dear.
blockquote {border-left:3px solid #0F0 !important; padding-left:1em !important;}
/* Submissions */
.data .status0 {background:#FFF !important; color:#080 !important;}
.data .status0 a {color:#080 !important;}
.data .status0 a:visited {color:#0A0 !important;}
.data .status0 a:hover {color:#0C0 !important;}
.data .status1 {background:#800 !important;}
.data .status2 {background:#256625 !important;}